ceph-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ceph: fix missing snapshot context in write operations
@ 2025-09-24  9:58 ethanwu
  2025-09-24  9:58 ` [PATCH] ceph: fix snapshot context missing in ceph_zero_partial_object ethanwu
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: ethanwu @ 2025-09-24  9:58 UTC (permalink / raw)
  To: ceph-devel; +Cc: xiubli, idryomov, ethanwu

This series addresses two instances where Ceph filesystem operations
were missing proper snapshot context handling, which could lead to
data inconsistencies in snapshots.

The issue occurs in two scenarios:
1. ceph_zero_partial_object() during fallocate punch hole operations
2. ceph_uninline_data() when converting inline data to regular objects

Both functions were passing NULL snapshot context to OSD write operations
instead of acquiring the appropriate context from either pending cap snaps
or the inode's head snapc. This could result in snapshot data corruption
where subsequent reads from snapshots would return modified data instead
of the original snapshot content.

The fix ensures that proper snapshot context is acquired and passed to
all OSD write operations in these code paths.

ethanwu (2):
  ceph: fix snapshot context missing in ceph_zero_partial_object
  ceph: fix snapshot context missing in ceph_uninline_data

 fs/ceph/addr.c | 19 +++++++++++++++++--
 fs/ceph/file.c | 17 ++++++++++++++++-
 2 files changed, 33 insertions(+), 3 deletions(-)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2025-09-25 19:31 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-24  9:58 [PATCH] ceph: fix missing snapshot context in write operations ethanwu
2025-09-24  9:58 ` [PATCH] ceph: fix snapshot context missing in ceph_zero_partial_object ethanwu
2025-09-24 18:26   ` Viacheslav Dubeyko
2025-09-25 10:24     ` tzuchieh wu
2025-09-25 19:31       ` Viacheslav Dubeyko
2025-09-24  9:58 ` [PATCH] ceph: fix snapshot context missing in ceph_uninline_data ethanwu
2025-09-24 18:32   ` Viacheslav Dubeyko
2025-09-24 18:05 ` [PATCH] ceph: fix missing snapshot context in write operations Viacheslav Dubeyko

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).