Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/rump/librump/rumpvfs * report partition size in blocks i...



details:   https://anonhg.NetBSD.org/src/rev/c66185cb41a8
branches:  trunk
changeset: 749294:c66185cb41a8
user:      pooka <pooka%NetBSD.org@localhost>
date:      Wed Nov 25 15:01:28 2009 +0000

description:
* report partition size in blocks instead of bytes
* "support" DIOCCACHESYNC.

diffstat:

 sys/rump/librump/rumpvfs/rumpblk.c |  11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diffs (39 lines):

diff -r 344739f3081e -r c66185cb41a8 sys/rump/librump/rumpvfs/rumpblk.c
--- a/sys/rump/librump/rumpvfs/rumpblk.c        Wed Nov 25 14:43:31 2009 +0000
+++ b/sys/rump/librump/rumpvfs/rumpblk.c        Wed Nov 25 15:01:28 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rumpblk.c,v 1.31 2009/11/20 17:48:52 pooka Exp $       */
+/*     $NetBSD: rumpblk.c,v 1.32 2009/11/25 15:01:28 pooka Exp $       */
 
 /*
  * Copyright (c) 2009 Antti Kantee.  All Rights Reserved.
@@ -52,7 +52,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rumpblk.c,v 1.31 2009/11/20 17:48:52 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rumpblk.c,v 1.32 2009/11/25 15:01:28 pooka Exp $");
 
 #include <sys/param.h>
 #include <sys/buf.h>
@@ -184,7 +184,7 @@
        for (i = 0; i < part; i++) {
                lp->d_partitions[i].p_fstype = FS_UNUSED;
        }
-       lp->d_partitions[part].p_size = size;
+       lp->d_partitions[part].p_size = size >> DEV_BSHIFT;
        lp->d_npartitions = part+1;
        /* XXX: file system type? */
 
@@ -532,6 +532,11 @@
                pi->part = &rblk->rblk_label.d_partitions[DISKPART(dmin)];
                pi->disklab = &rblk->rblk_label;
                break;
+
+       /* it's synced enough along the write path */
+       case DIOCCACHESYNC:
+               break;
+
        default:
                error = ENOTTY;
                break;



Home | Main Index | Thread Index | Old Index