Previous section.

Protocols for Interworking: XNFS, Version 3W
Copyright © 1998 The Open Group

Name

NFSPROC3_GETATTR - Get File Attributes

Call Arguments

struct GETATTR3args { nfs_fh3 object; };

Return Arguments

struct GETATTR3resok { fattr3 obj_attributes; };

union GETATTR3res switch (nfsstat3 status) { case NFS3_OK: GETATTR3resok resok; default: void; };

RPC Procedure Description

GETATTR3res NFSPROC3_GETATTR(GETATTR3args) = 1;

Description

Procedure GETATTR retrieves the attributes for a specified file system object. The object is identified by the file handle that the server returned as part of the response from a LOOKUP, CREATE, MKDIR, SYMLINK, MKNOD or READDIRPLUS procedure (or from the MOUNT service, described in Mount Protocol, Version 3 ).

On entry, the arguments in GETATTR3args are:

object
The file handle of an object whose attributes are to be retrieved.

Upon successful return, GETATTR3res.status is NFS3_OK and GETATTR3res.resok contains:

obj_attributes
The attributes for the object.

Otherwise, GETATTR3res.status contains the error on failure and no other results are returned.

Implementation Guidance

The attributes of file system objects is a point of major disagreement between different operating systems. Servers must make a best attempt to support all of the attributes in the fattr3 structure so that clients can count on this as a common ground. Some mapping may be required to map local attributes to those in the fattr3 structure.

Today, most client NFS Version 3 protocol implementations implement a time-bounded attribute caching scheme to reduce over-the-wire attribute checks.

Return Codes

NFS3ERR_IO
I/O error. Some sort of hard error occurred when the operation was in progress. This could be a disk error, for example.

NFS3ERR_STALE
Invalid file handle. The file handle given in the arguments was invalid. The file referred to by that file handle no longer exists or access to it has been revoked.

NFS3ERR_BADHANDLE

Invalid NFS file handle. The file handle failed internal consistency checks.

NFS3ERR_SERVERFAULT

An error occurred on the server, which does not map to any of the valid NFS Version 3 protocol error values. The client should translate this into an appropriate error. Clients based on an XPG system may choose to translate this to EIO.


Why not acquire a nicely bound hard copy?
Click here to return to the publication details or order a copy of this publication.

Contents Next section Index