All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Wilcox <matthew@wil.cx>
To: Andreas Dilger <adilger@dilger.ca>
Cc: "Gao, Yunpeng" <yunpeng.gao@intel.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	"linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>,
	"linux-ext4@vger.kernel.org" <linux-ext4@vger.kernel.org>,
	"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
	"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>
Subject: Re: Is it possible for the ext4/btrfs file system to pass some context related info to low level block driver?
Date: Thu, 5 May 2011 12:10:32 -0600	[thread overview]
Message-ID: <20110505181032.GA21360@parisc-linux.org> (raw)
In-Reply-To: <60C31100-5694-4CA9-A778-91CB15915052@dilger.ca>

On Wed, May 04, 2011 at 08:51:39AM -0600, Andreas Dilger wrote:
> I was aware of REQ_META, but I didn't know there was any benefit to
> using it. I think it would be easy to set REQ_META on all ext4 metadata
> if there was a reason to do so.

The CFQ ioscheduler pays attention to it (prioritising metadata accesses
over data accesses), and blocktrace will print an 'M' for metadata
requests if it's set, so I think that's two excellent reasons to set
REQ_META today.

However, ext3, ext4, and XFS already use it:

fs/ext3/inode.c:1105:   ll_rw_block(READ_META, 1, &bh);
fs/ext3/inode.c:2754:           submit_bh(READ_META, bh);
fs/ext3/namei.c:924:                                    ll_rw_block(READ_META, 1, &bh);
fs/ext4/inode.c:1500:   ll_rw_block(READ_META, 1, &bh);
fs/ext4/inode.c:4775:           submit_bh(READ_META, bh);
fs/ext4/namei.c:924:                                    ll_rw_block(READ_META, 1, &bh);
fs/gfs2/log.c:597:              submit_bh(WRITE_SYNC | REQ_META, bh);
fs/gfs2/log.c:599:              submit_bh(WRITE_FLUSH_FUA | REQ_META, bh);
fs/gfs2/meta_io.c:39:   int write_op = REQ_META |
fs/gfs2/meta_io.c:228:  submit_bh(READ_SYNC | REQ_META, bh);
fs/gfs2/meta_io.c:435:          ll_rw_block(READ_SYNC | REQ_META, 1, &first_bh);
fs/gfs2/ops_fstype.c:221:       submit_bio(READ_SYNC | REQ_META, bio);
fs/gfs2/quota.c:710:            ll_rw_block(READ_META, 1, &bh);
fs/xfs/linux-2.6/xfs_buf.c:1321:                rw = (bp->b_flags & XBF_WRITE) ? WRITE_META : READ_META;
include/linux/fs.h:164:#define READ_META                (READ | REQ_META)
include/linux/fs.h:168:#define WRITE_META               (WRITE | REQ_META)

btrfs seems to not use REQ_META yet.  *poke* *poke* :-)

-- 
Matthew Wilcox				Intel Open Source Technology Centre
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours.  We can't possibly take such
a retrograde step."

  reply	other threads:[~2011-05-05 18:10 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-03  2:44 Is it possible for the ext4/btrfs file system to pass some context related info to low level block driver? Gao, Yunpeng
2011-05-03  4:10 ` Kyungmin Park
2011-05-03  4:10   ` Kyungmin Park
2011-05-04 10:31   ` Gao, Yunpeng
2011-05-03 13:43 ` Martin K. Petersen
2011-05-03 13:43   ` Martin K. Petersen
2011-05-04 11:45   ` Gao, Yunpeng
2011-05-04 14:51     ` Andreas Dilger
2011-05-05 18:10       ` Matthew Wilcox [this message]
2011-05-05 20:11         ` Andreas Dilger
2011-05-09  5:50       ` Gao, Yunpeng

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=20110505181032.GA21360@parisc-linux.org \
    --to=matthew@wil.cx \
    --cc=adilger@dilger.ca \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=yunpeng.gao@intel.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.