cm_ftruncate

Assar Westerlund assar at sics.se
Mon Apr 6 22:31:54 CEST 1998


Cheng Jin <chengjin at eecs.umich.edu> writes:
> What does cm_ftruncate do?  
> 
> if (XA_VALID_SIZE(&h->attr))
>          res = cm_ftruncate (*fid, h->attr.xa_size, ce);
> 
> this is in xfs_message_putattr, but I can't tell when/why the VALID_SIZE
> bit would be set from the src.

The vnode operation that gets called for all of chown, chmod, utimes,
and ftruncate is setattr, which makes sense because the attributes are
being changed.  Now, in arlad (and in AFS) these are being treated as
different operations and thus in xfs_message_putattr the code tries to
figure out if we're changing the length of the file (ftruncate) and
then calling the cm_ftruncate which will ftruncate the local cache
file and the real file stored at the file server.

Does this answer your question?

/assar





More information about the Arla-drinkers mailing list