* [PATCH] Btrfs: fix wrong argument for btrfs_lookup_ordered_range @ 2017-01-24 23:58 Liu Bo 2017-01-25 8:19 ` Chandan Rajendra 0 siblings, 1 reply; 5+ messages in thread From: Liu Bo @ 2017-01-24 23:58 UTC (permalink / raw) To: linux-btrfs 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); -- 2.5.5 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] Btrfs: fix wrong argument for btrfs_lookup_ordered_range 2017-01-24 23:58 [PATCH] Btrfs: fix wrong argument for btrfs_lookup_ordered_range Liu Bo @ 2017-01-25 8:19 ` Chandan Rajendra 2017-01-25 15:06 ` Liu Bo 0 siblings, 1 reply; 5+ messages in thread From: Chandan Rajendra @ 2017-01-25 8:19 UTC (permalink / raw) To: Liu Bo; +Cc: linux-btrfs, cmason, Josef Bacik, dsterba 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 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Btrfs: fix wrong argument for btrfs_lookup_ordered_range 2017-01-25 8:19 ` Chandan Rajendra @ 2017-01-25 15:06 ` Liu Bo 2017-01-26 17:28 ` David Sterba 0 siblings, 1 reply; 5+ messages in thread From: Liu Bo @ 2017-01-25 15:06 UTC (permalink / raw) To: Chandan Rajendra; +Cc: linux-btrfs, cmason, Josef Bacik, dsterba On Wed, Jan 25, 2017 at 01:49:09PM +0530, Chandan Rajendra wrote: > 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. It could be a performance regression which causes fault writes have unnecessary waits instead of a real corruption. Thanks, -liubo ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Btrfs: fix wrong argument for btrfs_lookup_ordered_range 2017-01-25 15:06 ` Liu Bo @ 2017-01-26 17:28 ` David Sterba 2017-01-26 17:49 ` Caitlyn Mason 0 siblings, 1 reply; 5+ messages in thread From: David Sterba @ 2017-01-26 17:28 UTC (permalink / raw) To: Liu Bo; +Cc: Chandan Rajendra, linux-btrfs, cmason, Josef Bacik, dsterba On Wed, Jan 25, 2017 at 07:06:18AM -0800, Liu Bo wrote: > On Wed, Jan 25, 2017 at 01:49:09PM +0530, Chandan Rajendra wrote: > > 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. > > It could be a performance regression which causes fault writes have > unnecessary waits instead of a real corruption. Does not seem to be urgent for stable, but I'll consider it next time doing a stable round updates. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Btrfs: fix wrong argument for btrfs_lookup_ordered_range 2017-01-26 17:28 ` David Sterba @ 2017-01-26 17:49 ` Caitlyn Mason 0 siblings, 0 replies; 5+ messages in thread From: Caitlyn Mason @ 2017-01-26 17:49 UTC (permalink / raw) To: dsterba@suse.cz, Liu Bo Cc: Chandan Rajendra, linux-btrfs@vger.kernel.org, Josef Bacik, dsterba@suse.com [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #1: Type: text/plain; charset="utf-8", Size: 2676 bytes --] I donât think Iâm supposed to be on this thread â please move me to bcc! ⺠-- caitlyn mason Facebook | University Programs M: (508) 963-6209 E: caitmase@fb.com facebook.com/careers On 1/26/17, 9:28 AM, "David Sterba" <dsterba@suse.cz> wrote: On Wed, Jan 25, 2017 at 07:06:18AM -0800, Liu Bo wrote: > On Wed, Jan 25, 2017 at 01:49:09PM +0530, Chandan Rajendra wrote: > > 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. > > It could be a performance regression which causes fault writes have > unnecessary waits instead of a real corruption. Does not seem to be urgent for stable, but I'll consider it next time doing a stable round updates. ÿôèº{.nÇ+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±ý»k~ÏâØ^nr¡ö¦zË\x1aëh¨èÚ&£ûàz¿äz¹Þú+Ê+zf£¢·h§~Ûiÿÿïêÿêçz_è®\x0fæj:+v¨þ)ߣøm ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-01-26 19:22 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2017-01-24 23:58 [PATCH] Btrfs: fix wrong argument for btrfs_lookup_ordered_range Liu Bo 2017-01-25 8:19 ` Chandan Rajendra 2017-01-25 15:06 ` Liu Bo 2017-01-26 17:28 ` David Sterba 2017-01-26 17:49 ` Caitlyn Mason
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox