Re: [PATCH v4 37/39] netfs: Optimise away reads above the point at which there can be no data

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

 



Jeff Layton <jlayton@xxxxxxxxxx> wrote:

> >  (4) On local truncation up, we don't change zero_point.
> > 
> 
> The above seems odd, but I guess the assumption is that if there are any
> writes by a 3rd party above the old zero point, that that would cause an
> invalidation?

All truncating up does is extend the region from which reading would return
zeros, so it doesn't affect the zero_point.

If a third party interferes, then we have to invalidate the local caches and
reset zero_point to the EOF.  But if a third party is writing to the file at
the same time as you without both of you using locking or exclusive direct
writes, your data is probably screwed anyway...

Something cifs and ceph can use leasing to make this work; afs uses the data
version number, notifications and the principle that you should use file
locks.

David





[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