linux/fs/9p
Sripathi Kodi 87d7845aa0 9p: Implement client side of setattr for 9P2000.L protocol.
SYNOPSIS

      size[4] Tsetattr tag[2] attr[n]

      size[4] Rsetattr tag[2]

    DESCRIPTION

      The setattr command changes some of the file status information.
      attr resembles the iattr structure used in Linux kernel. It
      specifies which status parameter is to be changed and to what
      value. It is laid out as follows:

         valid[4]
            specifies which status information is to be changed. Possible
            values are:
            ATTR_MODE       (1 << 0)
            ATTR_UID        (1 << 1)
            ATTR_GID        (1 << 2)
            ATTR_SIZE       (1 << 3)
            ATTR_ATIME      (1 << 4)
            ATTR_MTIME      (1 << 5)
            ATTR_ATIME_SET  (1 << 7)
            ATTR_MTIME_SET  (1 << 8)

            The last two bits represent whether the time information
            is being sent by the client's user space. In the absense
            of these bits the server always uses server's time.

         mode[4]
            File permission bits

         uid[4]
            Owner id of file

         gid[4]
            Group id of the file

         size[8]
            File size

         atime_sec[8]
            Time of last file access, seconds

         atime_nsec[8]
            Time of last file access, nanoseconds

         mtime_sec[8]
            Time of last file modification, seconds

         mtime_nsec[8]
            Time of last file modification, nanoseconds

Explanation of the patches:
--------------------------

*) The kernel just copies relevent contents of iattr structure to
   p9_iattr_dotl structure and passes it down to the client. The
   only check it has is calling inode_change_ok()
*) The p9_iattr_dotl structure does not have ctime and ia_file
   parameters because I don't think these are needed in our case.
   The client user space can request updating just ctime by calling
   chown(fd, -1, -1). This is handled on server side without a need
   for putting ctime on the wire.
*) The server currently supports changing mode, time, ownership and
   size of the file.
*) 9P RFC says "Either all the changes in wstat request happen, or
   none of them does: if the request succeeds, all changes were made;
   if it fails, none were."
   I have not done anything to implement this specifically because I
   don't see a reason.

Signed-off-by: Sripathi Kodi <sripathik@in.ibm.com>
Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
2010-08-02 14:25:10 -05:00
..
cache.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
cache.h 9p: Add fscache support to 9p 2009-09-23 13:03:46 -05:00
fid.c fs/9p: Pass the correct user credentials during attach 2010-08-02 14:25:08 -05:00
fid.h 9p: Documentation updates 2008-05-14 19:23:25 -05:00
Kconfig 9p: Add fscache support to 9p 2009-09-23 13:03:46 -05:00
Makefile 9p: Add fscache support to 9p 2009-09-23 13:03:46 -05:00
v9fs_vfs.h 9p: getattr client implementation for 9P2000.L protocol. 2010-08-02 14:25:09 -05:00
v9fs.c fs/9p: Pass the correct user credentials during attach 2010-08-02 14:25:08 -05:00
v9fs.h 9p: add bdi backing to mount session 2010-04-22 11:42:00 +02:00
vfs_addr.c 9p: Add fscache support to 9p 2009-09-23 13:03:46 -05:00
vfs_dentry.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
vfs_dir.c 9p: readdir implementation for 9p2000.L 2010-08-02 14:25:07 -05:00
vfs_file.c 9p: Make use of iounit for read/write 2010-08-02 14:25:06 -05:00
vfs_inode.c 9p: Implement client side of setattr for 9P2000.L protocol. 2010-08-02 14:25:10 -05:00
vfs_super.c 9p: getattr client implementation for 9P2000.L protocol. 2010-08-02 14:25:09 -05:00