linux-unionfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Miklos Szeredi <miklos@szeredi.hu>
To: Amir Goldstein <amir73il@gmail.com>
Cc: Dave Chinner <david@fromorbit.com>,
	"linux-unionfs@vger.kernel.org" <linux-unionfs@vger.kernel.org>,
	Al Viro <viro@zeniv.linux.org.uk>, Christoph Hellwig <hch@lst.de>,
	linux-xfs@vger.kernel.org,
	"Darrick J . Wong" <darrick.wong@oracle.com>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>
Subject: Re: [PATCH v3 4/4] ovl: use vfs_copy_file_range() to copy up file data
Date: Thu, 22 Sep 2016 16:49:35 +0200	[thread overview]
Message-ID: <CAJfpeguhoMkkBWD7s6V-2jHaAvKrEn+sz8h0emcr7isR8yzKHg@mail.gmail.com> (raw)
In-Reply-To: <CAOQ4uxjhO0M4K4oNA0dGsN6-DHtJ7zFQVLe=T2qpuWb+eubaig@mail.gmail.com>

On Thu, Sep 22, 2016 at 10:49 AM, Amir Goldstein <amir73il@gmail.com> wrote:
> Guys, I just hit a lockdep warning on nesting an mnt_want_write() with
> this patch
> because overlay already holds the write lock when getting to ovl_copy_up_data()
> I don't know how I missed it before.
>
> Is it really a problem to nest this lock?
> Should I factor our another set of _locked helpers from the
> vfs_{copy,clone}_file_range helpers?
>

vfs_{copy,clone}_file_range should call sb_start_write() instead of
mnt_want_write_file(), the checks against FMODE_WRITE + S_ISREG ensure
that the __mnt_want_write() part is already held on the file.

That still leaves the lockdep warning.  We could do
__vfs_{copy,clone}_file_range() variants without the
sb_start_write()/sb_end_write() and add the non-underscore variants as
static inline to fs.h that do call the sb_start/end_write.

Thanks,
Miklos

  reply	other threads:[~2016-09-22 14:49 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-14 12:43 [PATCH v3 0/4] ovl: efficient copy up by reflink Amir Goldstein
2016-09-14 12:43 ` [PATCH v3 1/4] vfs: allow vfs_clone_file_range() across mount points Amir Goldstein
2016-09-14 12:43 ` [PATCH v3 2/4] ovl: use vfs_clone_file_range() for copy up if possible Amir Goldstein
2016-09-21 15:09   ` Miklos Szeredi
2016-09-21 17:01     ` Amir Goldstein
2016-09-21 18:29       ` Miklos Szeredi
2016-09-29  9:00         ` Amir Goldstein
2016-09-30 11:14           ` Miklos Szeredi
2016-09-21 21:48       ` Dave Chinner
2016-09-21 21:57         ` Al Viro
2016-09-21 22:33           ` Dave Chinner
2016-09-22  2:25             ` Darrick J. Wong
2016-09-22  2:52               ` Amir Goldstein
2016-09-14 12:43 ` [PATCH v3 3/4] vfs: allow vfs_copy_file_range() across file systems Amir Goldstein
2016-09-23  7:57   ` Amir Goldstein
2016-09-23 15:19     ` Darrick J. Wong
2016-09-23 16:13     ` Darrick J. Wong
2016-09-23 18:52       ` Amir Goldstein
2016-09-24 15:06         ` Darrick J. Wong
2016-09-26 16:33         ` Darrick J. Wong
2016-09-26 18:12           ` Amir Goldstein
2016-09-26 18:16             ` Darrick J. Wong
2016-09-14 12:43 ` [PATCH v3 4/4] ovl: use vfs_copy_file_range() to copy up file data Amir Goldstein
2016-09-22  8:49   ` Amir Goldstein
2016-09-22 14:49     ` Miklos Szeredi [this message]
2016-09-22 15:44       ` Amir Goldstein
2016-09-22 17:21         ` Amir Goldstein
2016-09-19 18:55 ` [PATCH v3 0/4] ovl: efficient copy up by reflink Amir Goldstein

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAJfpeguhoMkkBWD7s6V-2jHaAvKrEn+sz8h0emcr7isR8yzKHg@mail.gmail.com \
    --to=miklos@szeredi.hu \
    --cc=amir73il@gmail.com \
    --cc=darrick.wong@oracle.com \
    --cc=david@fromorbit.com \
    --cc=hch@lst.de \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-unionfs@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).