Re: [PATCH RFC] Ext3 data=guarded

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

 



On Thu, Sep 17, 2009 at 10:53:09PM +0100, Jamie Lokier wrote:
> Chris Mason wrote:
> > The main difference from data=ordered is that data=guarded only updates
> > the on disk i_size after all of the data blocks are on disk.  This allows
> > us to avoid flushing all the data pages down to disk with every commit.
> 
> I'm a bit confused, because I thought that was already guaranteed by
> ext3 data=ordered, due to the following mail:

Well, in data=ordered mode, we update the on disk i_size immediately.
This means that when the current transaction commits, the on disk i_size
reflects everything that has been written from file_write.

In order to avoid exposing stale data in data=ordered, we must force all
the dirty data down to disk before the transaction commits.

In data=guarded mode, we update the on disk i_size after all the data IO
is complete.  This may happen in a later transaction than the original
file write, but it allows us to avoid exposing stale data because the
i_size on disk is never bumped up until the data isn't stale anymore.

In data=guarded mode, the orphan list is used to make sure that all of
the metadata related to bytes that exist past the on disk i_size is
properly dealt with if we crash before the on disk i_size is updated.

data=guarded makes no ordering promises about overwriting existing
blocks inside of i_size.

-chris
--
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