linux-unionfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Amir Goldstein <amir73il@gmail.com>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: linux-unionfs@vger.kernel.org
Subject: [PATCH v3 0/4] overlayfs lock ordering changes
Date: Wed, 16 Aug 2023 18:23:30 +0300	[thread overview]
Message-ID: <20230816152334.924960-1-amir73il@gmail.com> (raw)

Hi Miklos,

I went for the less intrusive approach of holding mnt_writers
only throughout copy up instead of a long lived elevated refcount.
We could reconsider the long lived reference in the future.

Thanks,
Amir.

Changes since v2:
- Separate mnt_writers and sb_writers locks during copy up
- Fixs error handling bugs found by Miklos

Changes since v1:
- Breakup the large ovl_want_write() transaction in copy up
- Add fix to possible deadlock with encode lower ovl fh

Amir Goldstein (4):
  ovl: reorder ovl_want_write() after ovl_inode_lock()
  ovl: split ovl_want_write() into two helpers
  ovl: do not open/llseek lower file with upper sb_writers held
  ovl: do not encode lower fh with upper sb_writers held

 fs/overlayfs/copy_up.c   | 141 +++++++++++++++++++++++++--------------
 fs/overlayfs/dir.c       |  60 ++++++++---------
 fs/overlayfs/export.c    |   7 +-
 fs/overlayfs/inode.c     |  57 ++++++++--------
 fs/overlayfs/namei.c     |  37 +++++++---
 fs/overlayfs/overlayfs.h |  30 +++++++--
 fs/overlayfs/super.c     |  20 ++++--
 fs/overlayfs/util.c      |  73 ++++++++++++++++++--
 8 files changed, 275 insertions(+), 150 deletions(-)

-- 
2.34.1


             reply	other threads:[~2023-08-16 15:24 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-16 15:23 Amir Goldstein [this message]
2023-08-16 15:23 ` [PATCH v3 1/4] ovl: reorder ovl_want_write() after ovl_inode_lock() Amir Goldstein
2023-08-16 15:23 ` [PATCH v3 2/4] ovl: split ovl_want_write() into two helpers Amir Goldstein
2023-08-16 15:23 ` [PATCH v3 3/4] ovl: do not open/llseek lower file with upper sb_writers held Amir Goldstein
2023-08-16 15:23 ` [PATCH v3 4/4] ovl: do not encode lower fh " Amir Goldstein
2023-08-17  5:44 ` [PATCH v3 0/4] fs: export __mnt_{want,drop}_write to modules Amir Goldstein
2023-08-17 13:38   ` Christian Brauner
2023-08-17 13:55     ` Amir Goldstein
2023-08-17 14:32       ` Christian Brauner
2023-08-17 14:41         ` 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=20230816152334.924960-1-amir73il@gmail.com \
    --to=amir73il@gmail.com \
    --cc=linux-unionfs@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    /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).