From: Andrew W Elble <aweits@rit.edu>
To: Jeff Layton <jlayton@kernel.org>
Cc: ceph-devel@vger.kernel.org, pfmeec@rit.edu
Subject: Re: [PATCH 5/5] ceph: fold ceph_update_writeable_page into ceph_write_begin
Date: Fri, 11 Jun 2021 10:14:38 -0400 [thread overview]
Message-ID: <m2h7i45vzl.fsf@discipline.rit.edu> (raw)
In-Reply-To: <7817f98d3b2daafe113bf8290cc8c7adbb86fe99.camel@kernel.org> (Jeff Layton's message of "Wed, 16 Sep 2020 15:16:19 -0400")
We're seeing file corruption while running 5.10, bisected to 1cc1699070bd:
>> +static int ceph_write_begin(struct file *file, struct address_space *mapping,
>> + loff_t pos, unsigned len, unsigned flags,
>> + struct page **pagep, void **fsdata)
<snip>
>> + /*
>> + * In some cases we don't need to read at all:
>> + * - full page write
>> + * - write that lies completely beyond EOF
>> + * - write that covers the the page from start to EOF or beyond it
>> + */
>> + if ((pos_in_page == 0 && len == PAGE_SIZE) ||
>> + (pos >= i_size_read(inode)) ||
Shouldn't this be '((pos & PAGE_MASK) >= i_size_read(inode)) ||' ?
Seems like fs/netfs/read_helper.c currently has the same issue?
>> + (pos_in_page == 0 && (pos + len) >= i_size_read(inode))) {
>> + zero_user_segments(page, 0, pos_in_page,
>> + pos_in_page + len, PAGE_SIZE);
>> + break;
>> + }
--
Andrew W. Elble
Infrastructure Engineer
Information and Technology Services
Rochester Institute of Technology
tel: (585)-475-2411 | aweits@rit.edu
PGP: BFAD 8461 4CCF DC95 DA2C B0EB 965B 082E 863E C912
next prev parent reply other threads:[~2021-06-11 14:21 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-16 17:38 [PATCH 0/5] ceph: addr.c cleanups Jeff Layton
2020-09-16 17:38 ` [PATCH 1/5] ceph: break out writeback of incompatible snap context to separate function Jeff Layton
2020-09-16 17:38 ` [PATCH 2/5] ceph: don't call ceph_update_writeable_page from page_mkwrite Jeff Layton
2020-09-16 17:38 ` [PATCH 3/5] ceph: fold ceph_sync_readpages into ceph_readpage Jeff Layton
2020-09-16 17:38 ` [PATCH 4/5] ceph: fold ceph_sync_writepages into writepage_nounlock Jeff Layton
2020-09-16 17:38 ` [PATCH 5/5] ceph: fold ceph_update_writeable_page into ceph_write_begin Jeff Layton
2020-09-16 19:16 ` Jeff Layton
2021-06-11 14:14 ` Andrew W Elble [this message]
2021-06-11 14:52 ` Jeff Layton
2021-06-11 15:11 ` David Howells
2021-06-11 15:20 ` Matthew Wilcox
2021-06-11 15:35 ` David Howells
2021-06-11 15:59 ` Andrew W Elble
2021-06-11 17:56 ` Matthew Wilcox
2021-06-11 21:47 ` David Howells
2021-06-11 15:38 ` Jeff Layton
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=m2h7i45vzl.fsf@discipline.rit.edu \
--to=aweits@rit.edu \
--cc=ceph-devel@vger.kernel.org \
--cc=jlayton@kernel.org \
--cc=pfmeec@rit.edu \
/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