From: Nick Piggin <npiggin@gmail.com>
To: Jeff Moyer <jmoyer@redhat.com>
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
jaxboe@fusionio.com, Kyle McMartin <kmcmarti@redhat.com>
Subject: Re: [patch|rfc] block: don't mark buffers beyond end of disk as mapped
Date: Wed, 2 May 2012 00:26:55 +1000 [thread overview]
Message-ID: <CAPa8GCChTmXTmjY5GvsFsvXpP_WSuiiWMRDu7Lvb71G9tW1PTw@mail.gmail.com> (raw)
In-Reply-To: <x49lilcm1tb.fsf@segfault.boston.devel.redhat.com>
On 2 May 2012 00:08, Jeff Moyer <jmoyer@redhat.com> wrote:
> Nick Piggin <npiggin@gmail.com> writes:
>
>> Not a bad fix. But it's kind of sad to have i_size checking logic also in
>> block_read_full_page, that does not cope with this.
>>
>> I have found there are parts of the kernel (readahead) that try to read
>> beyond EOF and seem to get angry if we return an error (by not
>> marking uptodate in readpage) in that case though :(
>>
>> But, either way, I think it's very reasonable to not mark buffers beyond
>> end of device as mapped. So I think your patch is fine.
>>
>> I guess for ext[234], it does not read metadata close to the end of the
>> device or you were using 4K sized blocks?
>
> Well, the test case just reads directly from the loop device, bypassing
> the file system, and I did use 1KB blocks when making the file system, so
> it is quite puzzling.
It's because buffer_head creation does not go through the same paths
for bdev file access versus getblk APIs.
blkdev_get_block does the right thing there
In fact, it's probably good to unify the checks here, i.e., use max_blocks()
Thanks,
Nick
next prev parent reply other threads:[~2012-05-01 14:26 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-01 13:46 [patch|rfc] block: don't mark buffers beyond end of disk as mapped Jeff Moyer
2012-05-01 14:01 ` Nick Piggin
2012-05-01 14:08 ` Jeff Moyer
2012-05-01 14:26 ` Nick Piggin [this message]
2012-05-01 20:37 ` Jeff Moyer
2012-05-01 21:40 ` Jeff Moyer
2012-05-01 23:23 ` Nick Piggin
2012-05-01 23:22 ` Nick Piggin
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=CAPa8GCChTmXTmjY5GvsFsvXpP_WSuiiWMRDu7Lvb71G9tW1PTw@mail.gmail.com \
--to=npiggin@gmail.com \
--cc=jaxboe@fusionio.com \
--cc=jmoyer@redhat.com \
--cc=kmcmarti@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@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).