This PR adds the file handle parameter to the getattr request.
This feature is necessary when implementing filesystem APIs that generate file contents on request, like /proc.
The correct length of the file must be returned by getattr for that specific instance of the generated file, otherwise most programs will not read the file correctly. A file handle is needed to know which instance we are getting attributes for.
The parameter is available in ABI 7-9 and above, and has been feature gated as such. When the feature is not enabled, the getattr method on Filesystems will always be passed None for the file descriptor.
This PR adds the file handle parameter to the
getattr
request. This feature is necessary when implementing filesystem APIs that generate file contents on request, like/proc
. The correct length of the file must be returned bygetattr
for that specific instance of the generated file, otherwise most programs will not read the file correctly. A file handle is needed to know which instance we are getting attributes for.The parameter is available in ABI 7-9 and above, and has been feature gated as such. When the feature is not enabled, the
getattr
method on Filesystems will always be passed None for the file descriptor.