Re: [PATCH v7 1/6] mm: split SWP_FILE into SWP_ACTIVATED and SWP_FS

2018-10-16 Thread David Sterba
On Fri, Oct 12, 2018 at 01:59:34PM -0700, Andrew Morton wrote: > On Tue, 11 Sep 2018 15:34:44 -0700 Omar Sandoval wrote: > > > From: Omar Sandoval > > > > The SWP_FILE flag serves two purposes: to make swap_{read,write}page() > > go through the filesystem, and to make swapoff() call > >

Re: [PATCH v7 1/6] mm: split SWP_FILE into SWP_ACTIVATED and SWP_FS

2018-10-12 Thread Andrew Morton
On Tue, 11 Sep 2018 15:34:44 -0700 Omar Sandoval wrote: > From: Omar Sandoval > > The SWP_FILE flag serves two purposes: to make swap_{read,write}page() > go through the filesystem, and to make swapoff() call > ->swap_deactivate(). For Btrfs, we want the latter but not the former, > so split

Re: [PATCH v7 1/6] mm: split SWP_FILE into SWP_ACTIVATED and SWP_FS

2018-09-19 Thread Johannes Weiner
On Wed, Sep 19, 2018 at 11:12:02AM -0700, Omar Sandoval wrote: > On Wed, Sep 19, 2018 at 02:02:32PM -0400, Johannes Weiner wrote: > > On Tue, Sep 11, 2018 at 03:34:44PM -0700, Omar Sandoval wrote: > > > @@ -2411,8 +2412,10 @@ static int setup_swap_extents(struct > > > swap_info_struct *sis,

Re: [PATCH v7 1/6] mm: split SWP_FILE into SWP_ACTIVATED and SWP_FS

2018-09-19 Thread Omar Sandoval
On Wed, Sep 19, 2018 at 02:02:32PM -0400, Johannes Weiner wrote: > On Tue, Sep 11, 2018 at 03:34:44PM -0700, Omar Sandoval wrote: > > @@ -2411,8 +2412,10 @@ static int setup_swap_extents(struct > > swap_info_struct *sis, sector_t *span) > > > > if (mapping->a_ops->swap_activate) { > >

Re: [PATCH v7 1/6] mm: split SWP_FILE into SWP_ACTIVATED and SWP_FS

2018-09-19 Thread Johannes Weiner
On Tue, Sep 11, 2018 at 03:34:44PM -0700, Omar Sandoval wrote: > @@ -2411,8 +2412,10 @@ static int setup_swap_extents(struct swap_info_struct > *sis, sector_t *span) > > if (mapping->a_ops->swap_activate) { > ret = mapping->a_ops->swap_activate(sis, swap_file, span); > +

[PATCH v7 1/6] mm: split SWP_FILE into SWP_ACTIVATED and SWP_FS

2018-09-11 Thread Omar Sandoval
From: Omar Sandoval The SWP_FILE flag serves two purposes: to make swap_{read,write}page() go through the filesystem, and to make swapoff() call ->swap_deactivate(). For Btrfs, we want the latter but not the former, so split this flag into two. This makes us always call ->swap_deactivate() if