Re: [PATCH 4 of 8] Add flags to control direct IO helpers

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

 



On Wed, Feb 07, 2007 at 10:38:45PM +0530, Suparna Bhattacharya wrote:
> > + * The flags parameter is a bitmask of:
> > + *
> > + * DIO_PLACEHOLDERS (use placeholder pages for locking)
> > + * DIO_CREATE (pass create=1 to get_block for filling holes or extending)
> 
> A little more explanation about why these options are needed, and examples
> of when one would specify each of these options would be good.

I'll extend the comments in the patch, but for discussion here:

DIO_PLACEHOLDERS:  placeholders are inserted into the page cache to
synchronize the DIO with buffered writes.  From a locking point of view,
this is similar to inserting and locking pages in the address space
corresponding to the DIO.

placeholders guard against concurrent allocations and truncates during the DIO.
You don't need placeholders if truncates and allocations are are
impossible (for example, on a block device).

DIO_CREATE: placeholders make it possible for filesystems to safely fill
holes and extend the file via get_block during the DIO.  If DIO_CREATE
is turned on, get_block will be called with create=1, allowing the FS to
allocate blocks during the DIO.

DIO_DROP_I_MUTEX: If the write is inside of i_size, i_mutex is dropped
during the DIO and taken again before returning.

-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