Re: [PATCH 2/9] btrfs_direct_write(): cleaner way to handle generic_write_sync() suppression

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

 



On Tue, Jun 07, 2022 at 04:06:53PM +0000, Al Viro wrote:
> > Also the FUA check below needs to check IOMAP_DIO_NOSYNC as
> > well.
> 
> Does it?  AFAICS, we don't really care about REQ_FUA on any requests - what
> btrfs hack tries to avoid is stepping into
>         if (ret > 0 && (dio->flags & IOMAP_DIO_NEED_SYNC))
> 		ret = generic_write_sync(iocb, ret);
> with generic_write_sync() called by btrfs_do_write_iter() after it has
> dropped the lock held through btrfs_direct_write().  Do we want to
> suppress REQ_FUA on the requests generated by __iomap_dio_rw() in
> that case (DSYNC, !SYNC)?  Confused...

Yes.  FUA is an used an an optimization so that we can avid the
generic_write_sync or similar call if a O_DSYNC write doesn't need
any metadata update.  If the caller already does the generic_write_sync
equivalent we don't also need FUA.  It is not actually harmful in that
it gives worse results, but it will kill performance.



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

  Powered by Linux