Re: [PATCH 1/2] Btrfs: cleanup duplicated division functions

2012-09-17 Thread Miao Xie
On Mon, 17 Sep 2012 18:31:13 +0200, David Sterba wrote: > On Mon, Sep 17, 2012 at 10:21:00AM +0800, Miao Xie wrote: >> On fri, 14 Sep 2012 15:54:18 +0200, David Sterba wrote: >>> On Thu, Sep 13, 2012 at 06:51:36PM +0800, Miao Xie wrote: div_factor{_fine} has been implemented for two times, cle

Re: [PATCH 1/2] Btrfs: cleanup duplicated division functions

2012-09-17 Thread David Sterba
On Mon, Sep 17, 2012 at 10:21:00AM +0800, Miao Xie wrote: > On fri, 14 Sep 2012 15:54:18 +0200, David Sterba wrote: > > On Thu, Sep 13, 2012 at 06:51:36PM +0800, Miao Xie wrote: > >> div_factor{_fine} has been implemented for two times, cleanup it. > >> And I move them into a independent file named

Re: [PATCH 1/2] Btrfs: cleanup duplicated division functions

2012-09-17 Thread Ilya Dryomov
On Mon, Sep 17, 2012 at 10:21:00AM +0800, Miao Xie wrote: > On fri, 14 Sep 2012 15:54:18 +0200, David Sterba wrote: > > On Thu, Sep 13, 2012 at 06:51:36PM +0800, Miao Xie wrote: > >> div_factor{_fine} has been implemented for two times, cleanup it. > >> And I move them into a independent file named

Re: [PATCH 1/2] Btrfs: cleanup duplicated division functions

2012-09-16 Thread Miao Xie
On fri, 14 Sep 2012 15:54:18 +0200, David Sterba wrote: > On Thu, Sep 13, 2012 at 06:51:36PM +0800, Miao Xie wrote: >> div_factor{_fine} has been implemented for two times, cleanup it. >> And I move them into a independent file named math.h because they are >> common math functions. > > You remove

Re: [PATCH 1/2] Btrfs: cleanup duplicated division functions

2012-09-14 Thread David Sterba
On Thu, Sep 13, 2012 at 06:51:36PM +0800, Miao Xie wrote: > div_factor{_fine} has been implemented for two times, cleanup it. > And I move them into a independent file named math.h because they are > common math functions. You removed the sanity checks: - if (factor <= 0) - re

[PATCH 1/2] Btrfs: cleanup duplicated division functions

2012-09-13 Thread Miao Xie
div_factor{_fine} has been implemented for two times, cleanup it. And I move them into a independent file named math.h because they are common math functions. Signed-off-by: Miao Xie --- fs/btrfs/extent-tree.c | 19 +-- fs/btrfs/math.h| 44