-
Bug
-
Resolution: Unresolved
-
Medium
-
None
-
None
-
None
-
3
-
9223372036854775807
A read faked with OBD_FAIL_OST_FAKE_RW (0x238) marks its folio
uptodate, so osd_read_prep() takes the cache-hit branch and unlocks
the folio.
The per-thread DIO folios are locked when allocated and stay locked
for as long as the thread caches them; osd_get_folio() reuses them
without locking again. Unlocking one in that branch leaves it
unlocked for its next use, and the next user asserts:
ASSERTION( folio_test_locked(folio) ) failed
Three sites can hit it, all in master:
osd_write_commit() lustre/osd-ldiskfs/osd_io.c:1523, 1563
osd_read_prep() lustre/osd-ldiskfs/osd_io.c:1652
osd_key_fini() lustre/osd-ldiskfs/osd_handler.c:8290
so a real write or a cache-miss read reusing the folio LBUGs, and
failing that, the OST LBUGs on unmount when the thread key is torn
down.
Reproduced on a single node OST with fail_loc=0x238 set and direct
I/O reads and writes running against it.
A real read cannot reach the cache-hit branch holding a DIO folio,
since osd_get_folio() clears uptodate on each reuse, and page cache
folios never carry private_2. Only the faked read gets there.