RE: client caching and locks

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

 



> What does the client do to its cache when it writes to a locked range?
> 
> The RFC:
> 
> 	https://tools.ietf.org/html/rfc7530#section-10.3.2
> 
> seems to apply that you should get something like local-filesystem
> semantics if you write-lock any range that you write to and read-lock
> any range that you read from.
> 
> But I see a report that when applications write to non-overlapping
> ranges (while taking locks over those ranges), they don't see each
> other's updates.
> 
> I think for simultaneous non-overlapping writes to work that way, the
> client would need to invalidate its cache on unlock (except for the
> locked range).  But i can't tell what the client's designed to do.

Simultaneous non-overlapping WRITEs is not taken into consideration in RFC7530.
I personally think it is not necessary to deal with this case by modifying the kernel because
the application on the client can be implemented to avoid it.

Serialization of the simultaneous operations may be one of the ways.
Just before the write operation, each client locks and reads the overlapped range of data
instead of obtaining a lock in their own non-overlapping range.
They can reflect updates from other clients in this case.

Yuki Inoguchi

> 
> --b.




[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux