diff options
| author | Hristo Venev <hristo@venev.name> | 2026-02-25 19:07:56 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2026-03-19 16:08:30 +0100 |
| commit | 7335e21830b8d32b0b13de9564bd2894c5b5850a (patch) | |
| tree | 4e8ab535a4342d843e413732621770c47ed0bc8d /fs | |
| parent | 7db008e85a5d17b64bc5390b828bf457ae91a415 (diff) | |
ceph: do not skip the first folio of the next object in writeback
commit 081a0b78ef30f5746cda3e92e28b4d4ae92901d1 upstream.
When `ceph_process_folio_batch` encounters a folio past the end of the
current object, it should leave it in the batch so that it is picked up
in the next iteration.
Removing the folio from the batch means that it does not get written
back and remains dirty instead. This makes `fsync()` silently skip some
of the data, delays capability release, and breaks coherence with
`O_DIRECT`.
The link below contains instructions for reproducing the bug.
Cc: stable@vger.kernel.org
Fixes: ce80b76dd327 ("ceph: introduce ceph_process_folio_batch() method")
Link: https://tracker.ceph.com/issues/75156
Signed-off-by: Hristo Venev <hristo@venev.name>
Reviewed-by: Viacheslav Dubeyko <Slava.Dubeyko@ibm.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs')
| -rw-r--r-- | fs/ceph/addr.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c index 261f8996abc0..390f122feeaa 100644 --- a/fs/ceph/addr.c +++ b/fs/ceph/addr.c @@ -1334,7 +1334,6 @@ int ceph_process_folio_batch(struct address_space *mapping, } else if (rc == -E2BIG) { rc = 0; folio_unlock(folio); - ceph_wbc->fbatch.folios[i] = NULL; break; } |
