linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: linux-fsdevel@vger.kernel.org
Cc: akpm@linux-foundation.org, jack@suse.cz, jeffm@suse.com
Subject: ll_rw_block audit
Date: Wed, 23 Jun 2010 12:43:25 +0200	[thread overview]
Message-ID: <20100623104325.GA11845@lst.de> (raw)

I've just sent a patch to fsdevel to remove the SWRITE* flags and add
a new helper to write buffers using proper locking, which tricked me
into an audit of all ll_rw_block users.  There's not a lot left now,
so it might be time to kill them.  For writes we only have 6 users left:

fs/buffer.c:		ll_rw_block(WRITE, 1, &bh);
fs/hfs/hfs_fs.h:	ll_rw_block(WRITE, 1, &bh);
fs/reiserfs/journal.c:	ll_rw_block(WRITE, 1, &bh);
fs/reiserfs/journal.c:	ll_rw_block(WRITE, 1, &tbh);

plus two odd commented out ones in jbd/jbd2:

fs/jbd/recovery.c:			/* ll_rw_block(WRITE, 1, &nbh); */
fs/jbd2/recovery.c:			/* ll_rw_block(WRITE, 1, &nbh); */

The one in hfs is obviously a broken attempt to implement
sync_dirty_buffer, I'll send a patch to fix it.

That leaves:

  - write_boundary_block.

	This one is only used by __mpage_writepage and is a data
	integrity operation if WB_SYNC_ALL is set.  It should probably
	use write_dirty_buffer at least for that case.  Is it worth
	keeping the trylock for WB_SYNC_NONE writes?
	Btw, what's the reason this function is in buffer.c instead
	of mpage.c?

 - write_ordered_buffers and flush_commit_list in reiserfs.  Both of
   these look like data integrity operations to me, so using
   write_dirty_buffer seems in order.

For the read side we have 38 users. Most of them wait on the buffer
in some more or less broken form.  These should be replaced with the
bh_uptodate_or_lock/bh_submit_read combination, or possibly a helper
combining the two.  There's also a lot of places that look like
broken reimplementations of __bread_slow.



             reply	other threads:[~2010-06-23 10:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-23 10:43 Christoph Hellwig [this message]
2010-06-23 13:39 ` ll_rw_block audit Jan Kara

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=20100623104325.GA11845@lst.de \
    --to=hch@lst.de \
    --cc=akpm@linux-foundation.org \
    --cc=jack@suse.cz \
    --cc=jeffm@suse.com \
    --cc=linux-fsdevel@vger.kernel.org \
    /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).