diff options
| author | Venky Shankar <vshankar@redhat.com> | 2026-10-07 14:25:59 +0530 |
|---|---|---|
| committer | Ilya Dryomov <idryomov@gmail.com> | 2026-10-26 14:15:47 +0100 |
| commit | 6ff7920ca78f6edcabc26c63d20f681d938027c7 (patch) | |
| tree | 19b497f2310b73c08085b8728d80b237ca28de5c /include/linux/debugobjects.h | |
| parent | 728c856d7da04fb79f7aa00e974ffb6f55e55995 (diff) | |
ceph: don't fail write_begin with -EAGAIN after flushing old snapc
When ceph_netfs_check_write_begin() finds the folio dirty in an older
snap context, it drops the folio, waits for that snap context to be
flushed and then returns -EAGAIN so that the write is retried.
However, since commit fac47b43c760 ("netfs: do not unlock and put the
folio twice"), netfs_write_begin() retries only when ->check_write_begin()
returns 0 with *foliop cleared -- every error, -EAGAIN included, is
returned as is. The -EAGAIN thus propagates up to write(2), which fails
with "Resource temporarily unavailable" once the dirty data has been
flushed, rather than being retried.
This is easily hit by buffered writers rewriting dirty pages while
snapshots are being taken, e.g. a kernel build linking vmlinux into a
directory under a snapshot schedule:
ld: final link failed: Resource temporarily unavailable
Return the wait_event_killable() result as is so that netfs re-gets the
folio and retries on success.
Cc: stable@vger.kernel.org
Fixes: fac47b43c760 ("netfs: do not unlock and put the folio twice")
Link: https://tracker.ceph.com/issues/57656
Signed-off-by: Venky Shankar <vshankar@redhat.com>
Reviewed-by: Alex Markuze <amarkuze@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'include/linux/debugobjects.h')
0 files changed, 0 insertions, 0 deletions
