From d2b311f0ac1f97325e0e5afa6742e2cf556189bd Mon Sep 17 00:00:00 2001 From: Jim Garlick Date: Sun, 12 Jan 2025 13:47:14 -0800 Subject: [PATCH] doc: update Rstatfs description Problem: the description of Rstatfs suggests that an implementation should call statfs(2), but it can now be satisfied with statvfs(3) in a more portable manner. Just refer to statvfs(3). Don't quote structs as that's available elsewhere. --- protocol.md | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/protocol.md b/protocol.md index 9cc333c6..bcced899 100644 --- a/protocol.md +++ b/protocol.md @@ -145,20 +145,7 @@ size[4] Tstatfs tag[2] fid[4] size[4] Rstatfs tag[2] type[4] bsize[4] blocks[8] bfree[8] bavail[8] files[8] ffree[8] fsid[8] namelen[4] ``` -statfs is used to request file system information of the file system containing fid. The Rstatfs response corresponds to the fields returned by the statfs(2) system call, e.g.: -``` -struct statfs { - long f_type; /* type of file system (see below) */ - long f_bsize; /* optimal transfer block size */ - long f_blocks; /* total data blocks in file system */ - long f_bfree; /* free blocks in fs */ - long f_bavail; /* free blocks avail to non-superuser */ - long f_files; /* total file nodes in file system */ - long f_ffree; /* free file nodes in fs */ - fsid_t f_fsid; /* file system id */ - long f_namelen; /* maximum length of filenames */ -}; -``` +statfs is used to request file system information of the file system containing fid. See statvfs(3). #### lopen -- open a file ```