Message types for VFS flush

Change-Id: Ida7cbff4402bf876603a2153e2784699d93c03ea
This commit is contained in:
Lionel Sambuc 2014-04-29 16:15:37 +02:00
parent 16a3f23203
commit 5d682d17ee
5 changed files with 12 additions and 4 deletions

View file

@ -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;

View file

@ -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);

View file

@ -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);

View file

@ -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();

View file

@ -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);