From: Chao Yu <chao@kernel.org>
To: Eric Biggers <ebiggers@kernel.org>
Cc: Jaegeuk Kim <jaegeuk@kernel.org>, Theodore Ts'o <tytso@mit.edu>,
linux-f2fs-devel@lists.sourceforge.net,
linux-fsdevel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH] f2fs: remove broken support for allocating DIO writes
Date: Sat, 21 Aug 2021 06:01:26 +0800 [thread overview]
Message-ID: <c2d3a733-6caa-2bd8-ebe0-d26fe5132d16@kernel.org> (raw)
In-Reply-To: <YR/wbenc0d3eMAjz@sol.localdomain>
On 2021/8/21 2:11, Eric Biggers wrote:
> On Fri, Aug 20, 2021 at 05:35:21PM +0800, Chao Yu wrote:
>>>>>>
>>>>>> Hmm, I'm still trying to deal with this as a corner case where the writes
>>>>>> haven't completed due to an error. How about keeping the preallocated block
>>>>>> offsets and releasing them if we get an error? Do we need to handle EIO right?
>>>>>
>>>>> What about the case that CP + SPO following DIO preallocation? User will
>>>>> encounter uninitialized block after recovery.
>>>>
>>>> I think buffered writes as a workaround can expose the last unwritten block as
>>>> well, if SPO happens right after block allocation. We may need to compromise
>>>> at certain level?
>>>>
>>>
>>> Freeing preallocated blocks on error would be better than nothing, although note
>>> that the preallocated blocks may have filled an arbitrary sequence of holes --
>>> so simply truncating past EOF would *not* be sufficient.
>>>
>>> But really filesystems need to be designed to never expose uninitialized data,
>>> even if I/O errors or a sudden power failure occurs. It is unfortunate that
>>> f2fs apparently wasn't designed with that goal in mind.
>>>
>>> In any case, I don't think we can proceed with any other f2fs direct I/O
>>> improvements until this data leakage bug can be solved one way or another. If
>>> my patch to remove support for allocating writes isn't acceptable and the
>>> desired solution is going to require some more invasive f2fs surgery, are you or
>>> Chao going to work on it? I'm not sure there's much I can do here.
>>
>> I may have time to take look into the implementation as I proposed above, maybe
>> just enabling this in FSYNC_MODE_STRICT mode if user concerns unwritten data?
>> thoughts?
>>
>
> What does this have to do with fsync?
Oops, maybe a separate option is more appropriate.
>
> - Eric
>
prev parent reply other threads:[~2021-08-20 22:01 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-28 1:51 [PATCH] f2fs: remove broken support for allocating DIO writes Eric Biggers
2021-07-30 19:17 ` Eric Biggers
2021-07-30 22:12 ` Jaegeuk Kim
2021-07-30 22:19 ` Eric Biggers
2021-07-31 1:05 ` Jaegeuk Kim
2021-07-31 1:18 ` Eric Biggers
2021-07-31 2:46 ` Theodore Ts'o
2021-08-02 4:39 ` Eric Biggers
2021-08-02 9:00 ` Chao Yu
2021-08-02 18:23 ` Jaegeuk Kim
2021-08-03 1:19 ` Chao Yu
2021-08-03 1:34 ` Jaegeuk Kim
2021-08-17 2:03 ` Eric Biggers
2021-08-17 5:42 ` Christoph Hellwig
2021-08-17 18:57 ` Jaegeuk Kim
2021-08-17 20:27 ` Eric Biggers
2021-08-17 21:33 ` Jaegeuk Kim
2021-08-18 0:06 ` Eric Biggers
2021-08-20 9:35 ` Chao Yu
2021-08-20 18:11 ` Eric Biggers
2021-08-20 22:01 ` Chao Yu [this message]
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=c2d3a733-6caa-2bd8-ebe0-d26fe5132d16@kernel.org \
--to=chao@kernel.org \
--cc=ebiggers@kernel.org \
--cc=jaegeuk@kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-fsdevel@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=tytso@mit.edu \
/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).