[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20171130194249.GK729@wotan.suse.de>
Date: Thu, 30 Nov 2017 20:42:49 +0100
From: "Luis R. Rodriguez" <mcgrof@...nel.org>
To: Bart Van Assche <Bart.VanAssche@....com>,
Benjamin Marzinski <bmarzins@...hat.com>
Cc: "pavel@....cz" <pavel@....cz>,
"darrick.wong@...cle.com" <darrick.wong@...cle.com>,
"viro@...iv.linux.org.uk" <viro@...iv.linux.org.uk>,
"ming.lei@...hat.com" <ming.lei@...hat.com>,
"rjw@...ysocki.net" <rjw@...ysocki.net>,
"mcgrof@...nel.org" <mcgrof@...nel.org>,
"linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>,
"jikos@...nel.org" <jikos@...nel.org>,
"len.brown@...el.com" <len.brown@...el.com>,
"tytso@....edu" <tytso@....edu>,
"boris.ostrovsky@...cle.com" <boris.ostrovsky@...cle.com>,
"ONeukum@...e.com" <ONeukum@...e.com>,
"linux-block@...r.kernel.org" <linux-block@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"nborisov@...e.com" <nborisov@...e.com>,
"oleg.b.antonyan@...il.com" <oleg.b.antonyan@...il.com>,
"linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>,
"linux-xfs@...r.kernel.org" <linux-xfs@...r.kernel.org>,
"jgross@...e.com" <jgross@...e.com>,
"martin.petersen@...cle.com" <martin.petersen@...cle.com>,
"dan.j.williams@...el.com" <dan.j.williams@...el.com>,
"yu.chen.surf@...il.com" <yu.chen.surf@...il.com>,
"oleksandr@...alenko.name" <oleksandr@...alenko.name>,
"todd.e.brandt@...ux.intel.com" <todd.e.brandt@...ux.intel.com>,
"jack@...e.cz" <jack@...e.cz>
Subject: Re: [PATCH 00/11] fs: use freeze_fs on suspend/hibernate
On Thu, Nov 30, 2017 at 05:01:13PM +0000, Bart Van Assche wrote:
> It's great to see that you are making progress with this work :-) However,
> what's not clear to me is what your (long-term) plan is for freezing
> filesystems that e.g. exist on top of a md RAID1 block device?
The original approach of doing a full swing kill on kthread freezing helpers
in one shot was too much. We must therefore approach this turtle style and
carefully. This patch series currently only addresses filesystems which
have a freeze_fs() callback implemented, that's it. The rest of the kernel
needs more work.
So this work is far as I've gotten so far.
Note, it does *not* remove the kthread freezing API calls on any other drivers,
as such that should still work.
> The md resync
> thread must be stopped before a system is frozen. Today the md driver uses
> the kthread freezing mechanism for that purpose. Do you have a plan for
> handling the more complicated scenarios, e.g. a filesystem that exists on top
> of an md device where the md device uses one or more files as backing store
> and with the loop driver between the md device and the files?
Nope not yet. It seems you have given this some thought though so you're
help here is greatly appreciated. In fact the way we should see the long
term 'kill kthread freezing' effort should be a collaborative one. I've
never touched md, so folks more familiar with md should give this some
thought.
Can for instance md register_pm_notifier() and register_syscore_ops()
and do handy work to pause some work to replace kthread freezing?
Note that I believe a pm notifier is needed in case syscore_suspend()
is not called, say on a suspend fail.
> How about filesystems implemented in user space using the FUSE driver?
Not sure, someone more familiar with FUSE drivers should chime in. Right
now all this does is leverage filesystems which *do* implement freeze_fs()
only, and removes the kthread freezing calls after that. That's all. It
should not affect any other filesystems
Likewise consider filesystems that implement freeze_super() instead (like gfs2)
which don't hold sb->s_umount -- see commit 48b6bca6b7b8309 ("fs: add
freeze_super/thaw_super fs hooks"). If its desirable to address those as well,
it would seem a pair of non-locking iters somehow are needed. More work to
be done.
This all needs to be considered for the future as well.
> Patch 6/11 of this series freezes user space processes before freezing
> filesystems. Will that work for FUSE filesystems?
It doesn't add new code which should negatively affect FUSE drivers.
Long term if we wanted to address FUSE, it may require other work.
In the future then fs_suspend_freeze() may need to work for different
types of filesystems. Right now only filesystems which implement freeze_fs()
are addressed.
Luis
Powered by blists - more mailing lists