Message ID | 20150818104031.GF5033@dhcp22.suse.cz (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
On Tue, Aug 18, 2015 at 12:40:32PM +0200, Michal Hocko wrote: > From: Michal Hocko <mhocko@suse.com> > > Btrfs relies on GFP_NOFS allocation when commiting the transaction but > since "mm: page_alloc: do not lock up GFP_NOFS allocations upon OOM" > those allocations are allowed to fail which can lead to a pre-mature > transaction abort: I can either put the btrfs nofail ones on my pull for Linus, or you can add my sob and send as one unit. Just let me know how you'd rather do it. -chris -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Tue 18-08-15 13:11:44, Chris Mason wrote: > On Tue, Aug 18, 2015 at 12:40:32PM +0200, Michal Hocko wrote: > > From: Michal Hocko <mhocko@suse.com> > > > > Btrfs relies on GFP_NOFS allocation when commiting the transaction but > > since "mm: page_alloc: do not lock up GFP_NOFS allocations upon OOM" > > those allocations are allowed to fail which can lead to a pre-mature > > transaction abort: > > I can either put the btrfs nofail ones on my pull for Linus, or you can > add my sob and send as one unit. Just let me know how you'd rather do > it. OK, I will rephrase the changelogs (tomorrow) to not refer to an unmerged patch and would appreciate if you can take them and route them through your tree. I will then drop them from my pile. Thanks.
On Tue 18-08-15 19:29:14, Michal Hocko wrote: > On Tue 18-08-15 13:11:44, Chris Mason wrote: > > On Tue, Aug 18, 2015 at 12:40:32PM +0200, Michal Hocko wrote: > > > From: Michal Hocko <mhocko@suse.com> > > > > > > Btrfs relies on GFP_NOFS allocation when commiting the transaction but > > > since "mm: page_alloc: do not lock up GFP_NOFS allocations upon OOM" > > > those allocations are allowed to fail which can lead to a pre-mature > > > transaction abort: > > > > I can either put the btrfs nofail ones on my pull for Linus, or you can > > add my sob and send as one unit. Just let me know how you'd rather do > > it. > > OK, I will rephrase the changelogs (tomorrow) to not refer to an > unmerged patch and would appreciate if you can take them and route them > through your tree. I will then drop them from my pile. Poste in a separate thread http://lkml.kernel.org/r/1439986661-15896-1-git-send-email-mhocko@kernel.org
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index c374e1e71e5f..d855ddffd5fe 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -4607,9 +4607,7 @@ __alloc_extent_buffer(struct btrfs_fs_info *fs_info, u64 start, { struct extent_buffer *eb = NULL; - eb = kmem_cache_zalloc(extent_buffer_cache, GFP_NOFS); - if (eb == NULL) - return NULL; + eb = kmem_cache_zalloc(extent_buffer_cache, GFP_NOFS|__GFP_NOFAIL); eb->start = start; eb->len = len; eb->fs_info = fs_info; @@ -4867,9 +4865,7 @@ struct extent_buffer *alloc_extent_buffer(struct btrfs_fs_info *fs_info, return NULL; for (i = 0; i < num_pages; i++, index++) { - p = find_or_create_page(mapping, index, GFP_NOFS); - if (!p) - goto free_eb; + p = find_or_create_page(mapping, index, GFP_NOFS|__GFP_NOFAIL); spin_lock(&mapping->private_lock); if (PagePrivate(p)) {