Sync issue

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

 



Hi everybody,

we are  developing a filesystem  and despite we  hoped not to  need to
patch the  kernel  I  found  out  we  may  need  to  do  that  because  of
implementation of  sync super operation.  However, I would be  glad to
hear I am wrong and can get away without it.

The problem  is that  we require sync_fs()  super operation to  be the
last executed part of the sys_sync() syscall implementation.  In other
words, we need all inodes to be written before sync_fs() is called.

Unfortunately, what Linux does is (roughly):

sync_inodes_sb(sb, 0);
...
sb->s_op->sync_fs(sb, 1);
...
sync_inodes_sb(sb, 1);

sync_inodes_sb(sb, 0)   often    doesn't    write    out   all   dirty
inodes. Because our sync_fs()  finalizes writing out of metadata, this
does not work for us.

What  is more,  I regularly  encounter a  situation when  a part  of a
directory  operation   (usually  the  directory)   is  written  before
sync_fs() is  called and  the second part  (a new inode,  for example)
afterwards.  This  means that the  filesystem is only  half-synced and
also in an inconsistent state.

Is there  a different solution to  this issue apart  from patching the
kernel to  make sync_inodes_sb() exported and calling  it again from
within our sync_fs() with 1 as the second parameter?

TIA

Martin
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux