[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180611171938.GA5101@infradead.org>
Date: Mon, 11 Jun 2018 10:19:38 -0700
From: Christoph Hellwig <hch@...radead.org>
To: Ming Lei <ming.lei@...hat.com>
Cc: Jens Axboe <axboe@...com>, Christoph Hellwig <hch@...radead.org>,
Alexander Viro <viro@...iv.linux.org.uk>,
Kent Overstreet <kent.overstreet@...il.com>,
David Sterba <dsterba@...e.cz>,
Huang Ying <ying.huang@...el.com>,
linux-kernel@...r.kernel.org, linux-block@...r.kernel.org,
linux-fsdevel@...r.kernel.org, linux-mm@...ck.org,
Theodore Ts'o <tytso@....edu>,
"Darrick J . Wong" <darrick.wong@...cle.com>,
Coly Li <colyli@...e.de>, Filipe Manana <fdmanana@...il.com>,
Randy Dunlap <rdunlap@...radead.org>
Subject: Re: [PATCH V6 08/30] block: introduce chunk_last_segment()
I think both callers would be just as easy to understand by using
nth_page() instead of these magic helpers. E.g. for guard_bio_eod:
unsigned offset = (bv.bv_offset + bv.bv_len);
struct page *page = nth_page(bv.bv_page, offset);
zero_user(page, offset & PAGE_MASK, truncated_bytes);
Powered by blists - more mailing lists