[Ocfs2-devel] [PATCH] ocfs2: add trimfs dlm lock
Andrew Morton
akpm at linux-foundation.org
Thu Dec 7 15:33:50 PST 2017
On Thu, 7 Dec 2017 21:21:58 +0800 Gang He <ghe at suse.com> wrote:
> As you know, ocfs2 has support trim the underlying disk via
> fstrim command. But there is a problem, ocfs2 is a shared storage
> cluster file system, if the user configures a scheduled fstrim
> job on each file system node, this will trigger multiple nodes
> trim a shared disk simultaneously, it is very wasteful for CPU
> and IO consumption.
> Then, we introduce a trimfs dlm lock, which will make only one
> fstrim command is running on the shared disk among the cluster,
> the other fstrim command should be returned with -EBUSY errno.
Newly returning -EBUSY sounds a bit rude. And non-backward-compatible.
Would it be better for the other fstrim callers to wait until the
operation has completed then return success?
More information about the Ocfs2-devel
mailing list