From: Eric Biggers <ebiggers@kernel.org>
To: Daeho Jeong <daeho43@gmail.com>
Cc: Daeho Jeong <daehojeong@google.com>,
kernel-team@android.com, linux-kernel@vger.kernel.org,
linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [f2fs-dev] [PATCH] f2fs: add F2FS_IOC_SEC_TRIM_FILE ioctl
Date: Wed, 10 Jun 2020 18:56:51 -0700 [thread overview]
Message-ID: <20200611015651.GD1339@sol.localdomain> (raw)
In-Reply-To: <CACOAw_xqHnL0MthPykSrKJ8OXez-XigCFgC-vwm_keEZh_g8zw@mail.gmail.com>
On Thu, Jun 11, 2020 at 09:23:23AM +0900, Daeho Jeong wrote:
> Yes, I saw the implementation in vfs_write().
> But if we use mnt_want_write_file() here, it'll call mnt_clone_write()
> internally if the file is already open in write mode.
> Don't you think the below thing is needed? We can increase the counter
> each of them, open and ioctl, like other filesystems such as ext4.
>
> int mnt_clone_write(struct vfsmount *mnt)
> {
> /* superblock may be r/o */
> if (__mnt_is_readonly(mnt))
> return -EROFS;
> preempt_disable();
> mnt_inc_writers(real_mount(mnt));
> preempt_enable();
> return 0;
> }
No, this seems to be left over from when mnt_want_write_file() was paired with
mnt_drop_write() instead of mnt_drop_write_file(). I sent a patch to remove it:
https://lkml.kernel.org/r/20200611014945.237210-1-ebiggers@kernel.org
- Eric
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
next prev parent reply other threads:[~2020-06-11 1:57 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-09 6:01 [f2fs-dev] [PATCH] f2fs: add F2FS_IOC_SEC_TRIM_FILE ioctl Daeho Jeong
2020-06-09 16:51 ` Eric Biggers
2020-06-10 2:05 ` Daeho Jeong
2020-06-10 3:15 ` Eric Biggers
2020-06-10 3:55 ` Daeho Jeong
2020-06-10 23:31 ` Daeho Jeong
2020-06-10 23:53 ` Daeho Jeong
2020-06-11 0:00 ` Eric Biggers
2020-06-11 0:23 ` Daeho Jeong
2020-06-11 1:56 ` Eric Biggers [this message]
2020-06-11 2:05 ` Daeho Jeong
-- strict thread matches above, loose matches on Subject: below --
2020-06-11 3:08 Daeho Jeong
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=20200611015651.GD1339@sol.localdomain \
--to=ebiggers@kernel.org \
--cc=daeho43@gmail.com \
--cc=daehojeong@google.com \
--cc=kernel-team@android.com \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
/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).