From: Lionel Sambuc Date: Tue, 29 Apr 2014 14:15:37 +0000 (+0200) Subject: Message types for VFS flush X-Git-Tag: v3.3.0~346 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/mdoc.3.txt?a=commitdiff_plain;h=5d682d17eed975c21e33eb1a81f184e42631b2b1;p=minix.git Message types for VFS flush Change-Id: Ida7cbff4402bf876603a2153e2784699d93c03ea --- diff --git a/include/minix/ipc.h b/include/minix/ipc.h index 7e3d9fb6a..629635494 100644 --- a/include/minix/ipc.h +++ b/include/minix/ipc.h @@ -171,6 +171,13 @@ typedef struct { } mess_fs_vfs_create; _ASSERT_MSG_SIZE(mess_fs_vfs_create); +typedef struct { + dev_t device; + + uint8_t data[48]; +} mess_vfs_fs_flush; +_ASSERT_MSG_SIZE(mess_vfs_fs_flush); + typedef struct { ino_t dir_ino; ino_t root_ino; @@ -335,6 +342,7 @@ typedef struct { mess_fs_vfs_newnode m_fs_vfs_newnode; mess_vfs_fs_create m_vfs_fs_create; mess_fs_vfs_create m_fs_vfs_create; + mess_vfs_fs_flush m_vfs_fs_flush; mess_vfs_fs_lookup m_vfs_fs_lookup; mess_fs_vfs_lookup m_fs_vfs_lookup; mess_vfs_fs_mountpoint m_vfs_fs_mountpoint; diff --git a/lib/libpuffs/misc.c b/lib/libpuffs/misc.c index b07b937f6..9b80632a2 100644 --- a/lib/libpuffs/misc.c +++ b/lib/libpuffs/misc.c @@ -41,7 +41,7 @@ int fs_flush(void) * to disk. */ #if 0 - dev_t dev = fs_m_in.REQ_DEV; + dev_t dev = fs_m_in.m_vfs_fs_flush.device; if(dev == fs_dev) return(EBUSY); diff --git a/servers/ext2/misc.c b/servers/ext2/misc.c index 6902df25a..03191a9a8 100644 --- a/servers/ext2/misc.c +++ b/servers/ext2/misc.c @@ -49,7 +49,7 @@ int fs_flush() /* Flush the blocks of a device from the cache after writing any dirty blocks * to disk. */ - dev_t dev = fs_m_in.REQ_DEV; + dev_t dev = fs_m_in.m_vfs_fs_flush.device; if(dev == fs_dev) return(EBUSY); diff --git a/servers/mfs/misc.c b/servers/mfs/misc.c index b4af8d98e..d633595b6 100644 --- a/servers/mfs/misc.c +++ b/servers/mfs/misc.c @@ -38,7 +38,7 @@ int fs_flush() /* Flush the blocks of a device from the cache after writing any dirty blocks * to disk. */ - dev_t dev = fs_m_in.REQ_DEV; + dev_t dev = fs_m_in.m_vfs_fs_flush.device; if(dev == fs_dev && lmfs_bufs_in_use() > 0) return(EBUSY); lmfs_flushall(); diff --git a/servers/vfs/request.c b/servers/vfs/request.c index fcefe03ec..9928fb294 100644 --- a/servers/vfs/request.c +++ b/servers/vfs/request.c @@ -220,7 +220,7 @@ int req_flush(endpoint_t fs_e, dev_t dev) /* Fill in request message */ m.m_type = REQ_FLUSH; - m.REQ_DEV = dev; + m.m_vfs_fs_flush.device = dev; /* Send/rec request */ return fs_sendrec(fs_e, &m);