linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Correctness of inode_dio_end in generic DIO code
@ 2018-02-20  8:59 Nikolay Borisov
  2018-02-20 13:55 ` Jan Kara
  2018-02-20 20:47 ` Dave Chinner
  0 siblings, 2 replies; 3+ messages in thread
From: Nikolay Borisov @ 2018-02-20  8:59 UTC (permalink / raw)
  To: linux-fsdevel; +Cc: Jens Axboe, Goldwyn Rodrigues

Hello,

Currently the generic DIO code calls inode_dio_begin/inode_dio_end if
DIO_SKIP_DIO_COUNT is not set. However, te generic ode doesn't really
know if there is a lock synchronizing all the various inode_dio_*
operations. As per inode_dio_wait comment :


Must be called under a lock that serializes taking new references to
i_dio_count, usually by inode->i_mutex.

So is it at all correct to increment i_dio_count in generic dio code
without imposing strict locking requirement? Currently, most major
filesystems (Ext4/xfs/btrfs) do modify i_dio_count under their own
locks. Perhaps it's best if i_dio_count modification are removed from
the generic code, what do people think about that?

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-02-20 20:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-20  8:59 Correctness of inode_dio_end in generic DIO code Nikolay Borisov
2018-02-20 13:55 ` Jan Kara
2018-02-20 20:47 ` Dave Chinner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).