Re: [PATCH] btrfs: fix integer overflow in calc_reclaim_items_nr

2017-06-29 Thread David Sterba
Please ignore this mail, not intended to be sent. Extra -1 on the command line also picked the top patch. On Thu, Jun 29, 2017 at 08:20:15PM +0200, David Sterba wrote: > From: Chris Mason > > Dave Jones hit a WARN_ON(nr < 0) in btrfs_wait_ordered_roots() with > v4.12-rc6. This was

[PATCH] btrfs: fix integer overflow in calc_reclaim_items_nr

2017-06-29 Thread David Sterba
From: Chris Mason Dave Jones hit a WARN_ON(nr < 0) in btrfs_wait_ordered_roots() with v4.12-rc6. This was because commit 70e7af244 made it possible for calc_reclaim_items_nr() to return a negative number. It's not really a bug in that commit, it just didn't go far enough down the

Re: [PATCH] btrfs: fix integer overflow in calc_reclaim_items_nr

2017-06-23 Thread David Sterba
On Fri, Jun 23, 2017 at 05:29:56PM +0200, Holger Hoffstätte wrote: > On 06/23/17 16:32, Chris Mason wrote: > [..] > > -static inline int calc_reclaim_items_nr(struct btrfs_fs_info *fs_info, > > +static inline u64 calc_reclaim_items_nr(struct btrfs_fs_info *fs_info, > >

Re: [PATCH] btrfs: fix integer overflow in calc_reclaim_items_nr

2017-06-23 Thread Chris Mason
On 06/23/2017 11:29 AM, Holger Hoffstätte wrote: On 06/23/17 16:32, Chris Mason wrote: [..] -static inline int calc_reclaim_items_nr(struct btrfs_fs_info *fs_info, +static inline u64 calc_reclaim_items_nr(struct btrfs_fs_info *fs_info, u64 to_reclaim)

Re: [PATCH] btrfs: fix integer overflow in calc_reclaim_items_nr

2017-06-23 Thread Holger Hoffstätte
On 06/23/17 16:32, Chris Mason wrote: [..] > -static inline int calc_reclaim_items_nr(struct btrfs_fs_info *fs_info, > +static inline u64 calc_reclaim_items_nr(struct btrfs_fs_info *fs_info, > u64 to_reclaim) > { > u64 bytes; > - int nr; > + u64

[PATCH] btrfs: fix integer overflow in calc_reclaim_items_nr

2017-06-23 Thread Chris Mason
Dave Jones hit a WARN_ON(nr < 0) in btrfs_wait_ordered_roots() with v4.12-rc6. This was because commit 70e7af244 made it possible for calc_reclaim_items_nr() to return a negative number. It's not really a bug in that commit, it just didn't go far enough down the stack to find all the possible