NFSPROC3_MKDIR - Create a Directory
-
-
struct MKDIR3args {
diropargs3 where;
sattr3 attributes;
};
-
-
struct MKDIR3resok {
post_op_fh3 obj;
post_op_attr obj_attributes;
wcc_data dir_wcc;
};
struct MKDIR3resfail {
wcc_data dir_wcc;
};
union MKDIR3res switch (nfsstat3 status) {
case NFS3_OK:
MKDIR3resok resok;
default:
MKDIR3resfail resfail;
};
-
-
MKDIR3res
NFSPROC3_MKDIR(MKDIR3args) = 9;
Procedure MKDIR creates a new subdirectory.On entry, the arguments in MKDIR3args are:
- where
- The location of the subdirectory to be created:
- dir
- The file handle for the directory in which the subdirectory is to be created.
- name
- The name that is to be associated with the created subdirectory. See
General File Name Requirements for more information on file names.
- attributes
- The initial attributes for the subdirectory.
Upon successful return, MKDIR3res.status is NFS3_OK and the results in MKDIR3res.resok are:
- obj
- The file handle for the newly created directory.
- obj_attributes
- The attributes for the newly created subdirectory.
- dir_wcc
- Weak cache consistency data for the directory where.dir. For a client that requires only the post-.IR MKDIR directory attributes, these can be found in dir_wcc.after.
Otherwise, MKDIR3res.status contains the error on failure and MKDIR3res.resfail contains the following:
- dir_wcc
- Weak cache consistency data for the directory where.dir. For a client that requires only the post-.IR MKDIR directory attributes, these can be found in dir_wcc.after. Even though the MKDIR failed, full wcc_data is returned to allow the client to determine whether the failing MKDIR resulted in any change to the directory.
Many server implementations will not allow the filenames "." or ".." to be used as targets in a MKDIR operation. In this case, the server should return NFS3ERR_EXIST. SeeGeneral File Name Requirements for more information on file names.
- 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_ACCES
- Permission denied. The caller does not have the correct permission to perform the requested operation. Contrast this with NFS3ERR_PERM, which restricts itself to owner permission failures.
- NFS3ERR_EXIST
- File exists. The file specified already exists.
- NFS3ERR_NOTDIR
- Not a directory. The caller specified a non-directory in a directory operation.
- NFS3ERR_NOSPC
- No space left on device. The operation would have caused the server's file system to exceed its limit.
- NFS3ERR_ROFS
- Read-only file system. A modifying operation was attempted on a read-only file system.
- NFS3ERR_NAMETOOLONG
The filename in an operation was too long.
- NFS3ERR_DQUOT
- Resource (quota) hard limit exceeded. The user's resource limit on the server has been exceeded.
- 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_NOTSUPP
The operation is not supported.
- 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.
Contents | Next section | Index |