From: Chandan Rajendra <chandan@linux.vnet.ibm.com>
To: Liu Bo <bo.li.liu@oracle.com>
Cc: linux-btrfs@vger.kernel.org, cmason@fb.com,
Josef Bacik <jbacik@fb.com>,
dsterba@suse.com
Subject: Re: [PATCH] Btrfs: fix wrong argument for btrfs_lookup_ordered_range
Date: Wed, 25 Jan 2017 13:49:09 +0530 [thread overview]
Message-ID: <10463170.nZChnp8t2y@localhost.localdomain> (raw)
In-Reply-To: <1485302331-20167-1-git-send-email-bo.li.liu@oracle.com>
On Tuesday, January 24, 2017 03:58:51 PM Liu Bo wrote:
> Commit "d0b7da88 Btrfs: btrfs_page_mkwrite: Reserve space in sectorsized units"
> did this, but btrfs_lookup_ordered_range expects a 'length' rather than a
> 'page_end'.
>
> Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
> ---
> Is this a candidate for stable?
>
> fs/btrfs/inode.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
> index 4e02426..366cf0b 100644
> --- a/fs/btrfs/inode.c
> +++ b/fs/btrfs/inode.c
> @@ -9023,7 +9023,7 @@ int btrfs_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf)
> * we can't set the delalloc bits if there are pending ordered
> * extents. Drop our locks and wait for them to finish
> */
> - ordered = btrfs_lookup_ordered_range(inode, page_start, page_end);
> + ordered = btrfs_lookup_ordered_range(inode, page_start, PAGE_SIZE);
> if (ordered) {
> unlock_extent_cached(io_tree, page_start, page_end,
> &cached_state, GFP_NOFS);
>
Thanks for fixing this,
Reviewed-by: Chandan Rajendra <chandan@linux.vnet.ibm.com>
As for the question about whether this commit should be merged into the stable
trees ... I am not sure about that since I don't notice any sort of filesystem
corruption that can be caused by the current code i.e. With the existing code,
apart from any ordered extents that map the page in question, we are most
likely to be *unnecessarily* starting i/o on ordered extents that don't map
the file offset range covered by the page. Chris, Josef or David, Please let
us know your thoughts on this.
--
chandan
next prev parent reply other threads:[~2017-01-25 8:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-24 23:58 [PATCH] Btrfs: fix wrong argument for btrfs_lookup_ordered_range Liu Bo
2017-01-25 8:19 ` Chandan Rajendra [this message]
2017-01-25 15:06 ` Liu Bo
2017-01-26 17:28 ` David Sterba
2017-01-26 17:49 ` Caitlyn Mason
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=10463170.nZChnp8t2y@localhost.localdomain \
--to=chandan@linux.vnet.ibm.com \
--cc=bo.li.liu@oracle.com \
--cc=cmason@fb.com \
--cc=dsterba@suse.com \
--cc=jbacik@fb.com \
--cc=linux-btrfs@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