From: Christoph Hellwig <hch@infradead.org>
To: Andreas Gruenbacher <agruenba@redhat.com>
Cc: Chao Yu <yuchao0@huawei.com>,
Christoph Hellwig <hch@infradead.org>,
"Darrick J. Wong" <darrick.wong@oracle.com>,
linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
Gao Xiang <gaoxiang25@huawei.com>,
chao@kernel.org
Subject: Re: [RFC PATCH] iomap: generalize IOMAP_INLINE to cover tail-packing case
Date: Thu, 18 Jul 2019 05:31:55 -0700 [thread overview]
Message-ID: <20190718123155.GA21252@infradead.org> (raw)
In-Reply-To: <20190711122831.3970-1-agruenba@redhat.com>
> +iomap_to_bh(struct inode *inode, struct page *page, sector_t block,
> + struct buffer_head *bh, struct iomap *iomap)
> {
> loff_t offset = block << inode->i_blkbits;
>
> @@ -1924,6 +1924,10 @@ iomap_to_bh(struct inode *inode, sector_t block, struct buffer_head *bh,
> inode->i_blkbits;
> set_buffer_mapped(bh);
> break;
> + case IOMAP_INLINE:
> + __iomap_read_inline_data(inode, page, iomap);
> + set_buffer_uptodate(bh);
> + break;
I have to say I hate pushing this into the legacy buffer_head code.
My hope was that we could get rid of this code rather than adding to it.
The other issue is that this now calls iomap functions from buffer.c,
which I'd also really avoid.
That being said until the tail packing fs (erofs?) actually uses
buffer_heads we should not need this hunk, and I don't think erofs
should have any reason to use buffer_heads.
> +#define offset_in_block(offset, inode) \
> + ((unsigned long)(offset) & (i_blocksize(inode) - 1))
Make this an inline function, please. I think we also have a few
other places that could make use of this helper, maybe it might
even go into fs.h.
Otherwise this looks sensible to me.
next prev parent reply other threads:[~2019-07-18 12:32 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-03 7:55 [RFC PATCH] iomap: generalize IOMAP_INLINE to cover tail-packing case Chao Yu
2019-07-08 2:12 ` Chao Yu
2019-07-08 16:03 ` Christoph Hellwig
2019-07-09 13:52 ` Chao Yu
2019-07-09 23:32 ` Andreas Grünbacher
2019-07-10 10:30 ` Chao Yu
2019-07-10 21:50 ` Andreas Grünbacher
2019-07-10 23:42 ` Gao Xiang
2019-07-11 13:06 ` Matthew Wilcox
2019-07-11 13:54 ` Gao Xiang
2019-07-11 14:15 ` Chao Yu
2019-07-11 12:28 ` Andreas Gruenbacher
2019-07-12 9:31 ` Chao Yu
2019-07-12 11:54 ` Andreas Gruenbacher
2019-07-15 9:26 ` Chao Yu
2019-07-17 2:58 ` Chao Yu
2019-07-18 12:33 ` Christoph Hellwig
2019-07-18 12:31 ` Christoph Hellwig [this message]
2019-07-18 13:27 ` Gao Xiang
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=20190718123155.GA21252@infradead.org \
--to=hch@infradead.org \
--cc=agruenba@redhat.com \
--cc=chao@kernel.org \
--cc=darrick.wong@oracle.com \
--cc=gaoxiang25@huawei.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=yuchao0@huawei.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 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).