Skip to content

Commit 081a0b7

Browse files
hvenevidryomov
authored andcommitted
ceph: do not skip the first folio of the next object in writeback
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: [email protected] Fixes: ce80b76 ("ceph: introduce ceph_process_folio_batch() method") Link: https://tracker.ceph.com/issues/75156 Signed-off-by: Hristo Venev <[email protected]> Reviewed-by: Viacheslav Dubeyko <[email protected]> Signed-off-by: Ilya Dryomov <[email protected]>
1 parent 040d159 commit 081a0b7

1 file changed

Lines changed: 0 additions & 1 deletion

File tree

fs/ceph/addr.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1326,7 +1326,6 @@ void ceph_process_folio_batch(struct address_space *mapping,
13261326
continue;
13271327
} else if (rc == -E2BIG) {
13281328
folio_unlock(folio);
1329-
ceph_wbc->fbatch.folios[i] = NULL;
13301329
break;
13311330
}
13321331

0 commit comments

Comments
 (0)