Repository navigation
Conversation
fuse_reverse_inval_inode() ignored the result of invalidate_inode_pages2_range(), so folios left in the page cache after a notify went unnoticed. Log a rate-limited warning when the invalidate fails, and when the write in fuse_launder_folio() fails.
iomap_writeback_handle_eof() zeroes the folio straddling i_size past that size before ->writeback_range() runs, and passes the size on as end_pos. fuse_iomap_writeback_range() ignored end_pos and queued the whole block, relying on the crop in fuse_send_writepage() to drop the bytes past EOF. That crop reads i_size again when the request is sent. Under DLM with the writeback cache, i_size is only this node's view: each writer claims its own extension under fi->lock while the inode lock is held shared. A partial EOF folio can hold another node's bytes, read in by the read-modify-write read under the write grant. If a concurrent local writer extends i_size between the zeroing and the crop, the crop no longer trims the folio and the zeros are written over the other node's acknowledged data. RED-51747 hits this with three nodes writing interleaved 47008-byte blocks of one file: the higher block's head reads back as zeros up to the page boundary. Traces show the lower writer's flush leaving with "own block + zeros" while the page it read from the server, and the i_size it zeroed at, were correct; a higher-offset write had extended i_size 40 us before the request was sent. Send only up to end_pos and still report the whole range as handled, so the bytes iomap zeroed never reach the server. The 6.12 tree avoided this because its writeback crops at i_size without zeroing. Signed-off-by: Sven Oehme <soehme@ddn.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Under DLM with the writeback cache, a node's i_size only covers its own writes. When two nodes share a page at a block boundary, the lower writer's read before its partial write returns the upper writer's bytes from the server, but they lie past the local i_size. iomap_writeback_handle_eof() then zeroes them in the cached folio as if they were past EOF, the folio stays uptodate, and if i_size grows before the send is cropped the zeroes overwrite the other node's data on the server (RED-51747). A read reply proves the file extends at least to pos + res, since the server clips reads at its size. Raise i_size to cover those bytes in fuse_do_readfolio() and fuse_readpages_end(), so the folio tail is never treated as past EOF. The raise must not resurrect bytes a truncate removed while the read was in flight. attr_version cannot guard this, because every revoke bumps it, including the revoke of the range being read. Add fi->size_gen instead, bumped only by a local truncate and by a whole-file invalidate, which is how a remote truncate reaches the client, and drop the raise when it changed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…eplies
Under DLM with the writeback cache, i_size is only this node's view of
the file, and whether writeback treats bytes as past EOF depends on
what i_size was at that exact moment. When RED-51747 lost another
node's bytes to zeroes, the local i_size at writeback had to be
reconstructed from the order of DLM grants, because nothing records it.
Add three tracepoints:
fuse_isize_change every i_size change and why: the cached-write
extension claim, its retraction, or a size
taken from an attribute reply
fuse_writeback_range each writeback chunk with pos, len, bytes sent,
iomap's end_pos and the current i_size
fuse_readfolio_reply each fuse_do_readfolio() READ with the length
asked, the bytes returned and i_size
With these, the RED-51747 race shows up directly as a writeback chunk
whose end_pos is below i_size while its whole block is sent, preceded
by a READ reply that returned bytes past the local EOF.
Signed-off-by: Sven Oehme <soehme@ddn.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Under DLM the server's attr_valid can keep the attributes of a locked inode valid indefinitely. Once a DLM lock was taken on an inode, cap its i_time to dlm_attr_timeout seconds so a GETATTR goes out at most that long after the lock. The first attribute reply from the server after the lock ends the bound; a reply to a request sent before it is discarded by bumping attr_version. Default 30s, module parameter, 0 keeps the server's timeout. Signed-off-by: Horst Birthelmer <hbirthelmer@ddn.com>
185adff to
719a629
Compare
|
This does well on xfstests: and two of the fails are due to a wrong version of installed software (need that version for systing) |
|
Ok, there's a lot of changes going on here, but overall i think the structural direction Pros:
Cons:
|
we have done this with 6.8, 6.12 and 6.17 for a while now
there is no other system using this, since we create our dkms and src.rpms and deliver with every installation of infinia.
I have to take a look at this. |
…nd open Split file, address space, inode and vm operations into wt and wb variants chosen in fuse_init_file_inode()/fuse_init_common() from fc->writeback_cache. Drop fc->dlm, now unread; -ENOSYS to a DLM request aborts the connection. DAX is fixed per inode, passthrough per open. Install DAX file operations from fuse_dax_inode_init() and switch a passthrough open to passthrough file operations in fuse_finish_open(), so the cached read/write/mmap/splice paths no longer test for either. Each keeps the open, flush and release of its cache mode. Split fuse_do_setattr() the same way: fuse_wt_do_setattr() and fuse_wb_do_setattr() share the checks, the request and the exit, and the writeback variant truncates through fuse_wb_truncate_pagecache(). A failed write_inode_now() before the request no longer leaks the DAX invalidate lock. Only a read without a grant, the writethrough read_folio, is bounced by the server with -EDEADLK/-EAGAIN. fuse_wt_read_folio() reads outside iomap and returns AOP_TRUNCATED_PAGE after the unlock, which iomap_read_folio() cannot pass on; fuse_do_readfolio() returns the server's code unchanged. The writeback cache reads under a grant, so the dlm_retry_tasks retry of the iomap write path goes. Signed-off-by: Horst Birthelmer <hbirthelmer@ddn.com>
55b4426 to
89f712f
Compare
|
@achhenderson do you have made a decision? Do we want the latest commits? |
yes, I am fine with merging. I still haven't been able to figure out why I dont have a review button, but please proceed with the merge. Thanks! |
b4018f1
into
DDNStorage:redfs-ubuntu-resolute-7.0.0-14.14
No description provided.