Linux EXT4 FS development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Hungyu Lin" <dennylin0707@gmail.com>
Cc: linux-ext4@vger.kernel.org, tytso@mit.edu
Subject: Re: [PATCH] ext2: preserve completed DIO bytes when buffered fallback fails
Date: Mon, 02 Nov 2026 06:34:04 +0000	[thread overview]
Message-ID: <sashiko-outbox-192961@kernel.org> (raw)
In-Reply-To: <20261102061555.55183-1-dennylin0707@gmail.com>

> ext2_dio_write_iter() can complete part of a direct write before
> falling back to buffered I/O for a hole inside i_size. If
> generic_perform_write() then fails, its error overwrites the completed
> direct-I/O byte count.
> 
> For example, on a full filesystem, an 8 KiB write to a file with an
> allocated 4 KiB prefix and a 4 KiB hole overwrites the prefix but returns
> ENOSPC and leaves the file position unchanged. GNU dd with oflag=direct
> consequently reports zero bytes written.
> 
> Preserve a positive direct-I/O result and return the buffered error
> when no bytes were direct-written. This restores the fallback policy of
> generic_file_write_iter(), which ext2 used before its iomap conversion.
> 
> Fixes: fb5de4358e1a ("ext2: Move direct-io to use iomap")
> Cc: stable@vger.kernel.org
> Signed-off-by: Hungyu Lin <dennylin0707@gmail.com>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261102061555.55183-1-dennylin0707@gmail.com?part=1


  reply	other threads:[~2026-11-02  6:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-02  6:15 [PATCH] ext2: preserve completed DIO bytes when buffered fallback fails Hungyu Lin
2026-11-02  6:34 ` sashiko-bot [this message]
2026-11-02 21:46 ` Jan Kara

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=sashiko-outbox-192961@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=dennylin0707@gmail.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --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