Re: [PATCH 0/2] ceph: misc fixes for the fscrypt truncate size handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 11/16/21 12:56 PM, Xiubo Li wrote:

On 11/9/21 8:33 PM, Jeff Layton wrote:
On Mon, 2021-11-08 at 20:57 -0500, Jeff Layton wrote:

[...]
...I suspect this is related to the 075 failures, but I don't see it on every attempt, which makes me think "race condition". I'll keep hunting.
Yeah, seems the same issue.

I wonder if we're hitting the same problem that this patch was intended
to fix:

     057ba5b24532 ceph: Fix race between hole punch and page fault

It seems like the problem is very similar. It may be worth testing a
patch that takes the filemap_invalidate_lock across the on the wire
truncate and the vmtruncate.

Nope. I tried a draft patch that make setattr hold this lock over the
MDS call and the vmtruncate and it didn't help.

It's buggy by using the `filer.write_trunc()` caller in MDS side, it works well in case the truncate_from - truncate_size < 4MB, or it will keep the stale file contents without trimming or zeroing them.

I will push the MDS side PR to fix it.

Have updated the MDS side PR.

Both the generic/030 and generic/075 tests passed, and I am still testing others.

BRs

-- Xiubo


Thanks

-- Xiubo


Cheers,




[Index of Archives]     [CEPH Users]     [Ceph Large]     [Ceph Dev]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux