Re: o_sync in vfat driver

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

 



On Thursday 02 March 2006 09:07, OGAWA Hirofumi wrote:
> Chris Mason <[email protected]> writes:
> > filemap_fdatawrite() won't redirty the page.  It will wait on the pending
> > writeback.
>
> Umm... I'm looking the following code.
>
> +void
> +writeback_bdev(struct super_block *sb)
> +{
> +	struct address_space *mapping = sb->s_bdev->bd_inode->i_mapping;
> +	filemap_flush(mapping);
> +	blk_run_address_space(mapping);
> +}
> +EXPORT_SYMBOL_GPL(writeback_bdev);
>
> filemap_flush() is using WB_SYNC_NONE.
>
Ok, I thought you were asking about the code that called filemap_fdatawrite, 
which does wait.  filemap_flush is used on the underlying block device.  In 
the case of a page that is already under IO, the io is not cancelled but 
allowed to continue.

This is the desired result.  When you're doing a number of operations in 
sequence, each operation will start io on the block device.  If they used 
filemap_fdatawrite instead of filemap_flush, they would end up being 
synchronous.

-chris

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux