From: Jaegeuk Kim <jaegeuk@kernel.org>
To: Eric Biggers <ebiggers@kernel.org>
Cc: linux-f2fs-devel@lists.sourceforge.net, kernel-team@android.com,
Daeho Jeong <daehojeong@google.com>,
linux-kernel@vger.kernel.org
Subject: Re: [f2fs-dev] [PATCH] f2fs: change the way of handling range.len in F2FS_IOC_SEC_TRIM_FILE
Date: Thu, 9 Jul 2020 20:29:20 -0700 [thread overview]
Message-ID: <20200710032920.GD545837@google.com> (raw)
In-Reply-To: <20200710032531.GA2805@sol.localdomain>
On 07/09, Eric Biggers wrote:
> On Thu, Jul 09, 2020 at 08:20:35PM -0700, Jaegeuk Kim wrote:
> > On 07/10, Daeho Jeong wrote:
> > > 1. The valid data will be within i_size.
> > > 2. All the trim operations will be done in a unit of block, even if
> > > i_size is not aligned with BLKSIZE like the below.
> > >
> > > index = F2FS_BYTES_TO_BLK(range.start);
> > > pg_end = DIV_ROUND_UP(end_addr, F2FS_BLKSIZE); <= BLKSIZE aligned
> > >
> > > Are you worried about the case that sudden power-off occurs while a
> > > file is being truncated?
> > > ex) 1GB file is being truncated to 4KB -> sudden power-off ->
> > > i_size(4KB), i_blocks(maybe somewhere between 4KB and 1GB)
> >
> > Yes. Basically, I believe we can have some data beyond i_size like fsverity.
> >
>
> Note that fs-verity files are read-only, and therefore this ioctl can't be used
> on them (since it requires a writable file descriptor). So that case doesn't
> need to be handled here.
I meant it as an example of valid data beyond i_size.
>
> - Eric
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
WARNING: multiple messages have this Message-ID (diff)
From: Jaegeuk Kim <jaegeuk@kernel.org>
To: Eric Biggers <ebiggers@kernel.org>
Cc: Daeho Jeong <daeho43@gmail.com>,
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: change the way of handling range.len in F2FS_IOC_SEC_TRIM_FILE
Date: Thu, 9 Jul 2020 20:29:20 -0700 [thread overview]
Message-ID: <20200710032920.GD545837@google.com> (raw)
In-Reply-To: <20200710032531.GA2805@sol.localdomain>
On 07/09, Eric Biggers wrote:
> On Thu, Jul 09, 2020 at 08:20:35PM -0700, Jaegeuk Kim wrote:
> > On 07/10, Daeho Jeong wrote:
> > > 1. The valid data will be within i_size.
> > > 2. All the trim operations will be done in a unit of block, even if
> > > i_size is not aligned with BLKSIZE like the below.
> > >
> > > index = F2FS_BYTES_TO_BLK(range.start);
> > > pg_end = DIV_ROUND_UP(end_addr, F2FS_BLKSIZE); <= BLKSIZE aligned
> > >
> > > Are you worried about the case that sudden power-off occurs while a
> > > file is being truncated?
> > > ex) 1GB file is being truncated to 4KB -> sudden power-off ->
> > > i_size(4KB), i_blocks(maybe somewhere between 4KB and 1GB)
> >
> > Yes. Basically, I believe we can have some data beyond i_size like fsverity.
> >
>
> Note that fs-verity files are read-only, and therefore this ioctl can't be used
> on them (since it requires a writable file descriptor). So that case doesn't
> need to be handled here.
I meant it as an example of valid data beyond i_size.
>
> - Eric
next prev parent reply other threads:[~2020-07-10 3:29 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-10 2:15 [f2fs-dev] [PATCH] f2fs: change the way of handling range.len in F2FS_IOC_SEC_TRIM_FILE Daeho Jeong
2020-07-10 2:15 ` Daeho Jeong
2020-07-10 3:02 ` [f2fs-dev] " Jaegeuk Kim
2020-07-10 3:02 ` Jaegeuk Kim
2020-07-10 3:17 ` Daeho Jeong
2020-07-10 3:17 ` Daeho Jeong
2020-07-10 3:20 ` Jaegeuk Kim
2020-07-10 3:20 ` Jaegeuk Kim
2020-07-10 3:25 ` Eric Biggers
2020-07-10 3:25 ` Eric Biggers
2020-07-10 3:29 ` Jaegeuk Kim [this message]
2020-07-10 3:29 ` Jaegeuk Kim
2020-07-10 3:21 ` Chao Yu
2020-07-10 3:21 ` Chao Yu
2020-07-10 3:31 ` Jaegeuk Kim
2020-07-10 3:31 ` Jaegeuk Kim
2020-07-10 3:36 ` Chao Yu
2020-07-10 3:36 ` Chao Yu
2020-07-10 3:52 ` Jaegeuk Kim
2020-07-10 3:52 ` Jaegeuk Kim
2020-07-10 4:26 ` Daeho Jeong
2020-07-10 4:26 ` Daeho Jeong
2020-07-10 6:31 ` Chao Yu
2020-07-10 6:31 ` Chao Yu
2020-07-10 6:46 ` Jaegeuk Kim
2020-07-10 6:46 ` Jaegeuk Kim
2020-07-10 7:29 ` Chao Yu
2020-07-10 7:29 ` Chao Yu
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=20200710032920.GD545837@google.com \
--to=jaegeuk@kernel.org \
--cc=daehojeong@google.com \
--cc=ebiggers@kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.