From: Nikolay Borisov <nborisov@suse.com>
To: linux-fsdevel <linux-fsdevel@vger.kernel.org>
Cc: Jens Axboe <axboe@kernel.dk>, Goldwyn Rodrigues <rgoldwyn@suse.de>
Subject: Correctness of inode_dio_end in generic DIO code
Date: Tue, 20 Feb 2018 10:59:46 +0200 [thread overview]
Message-ID: <d9c0c106-3d2f-0184-6f69-a4502d6c56c1@suse.com> (raw)
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?
next reply other threads:[~2018-02-20 8:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-20 8:59 Nikolay Borisov [this message]
2018-02-20 13:55 ` Correctness of inode_dio_end in generic DIO code Jan Kara
2018-02-20 20:47 ` Dave Chinner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d9c0c106-3d2f-0184-6f69-a4502d6c56c1@suse.com \
--to=nborisov@suse.com \
--cc=axboe@kernel.dk \
--cc=linux-fsdevel@vger.kernel.org \
--cc=rgoldwyn@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).