Re: [PATCH] nfs: support 64-bit root inode number in NFS FSID

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Myklebust, Trond wrote:

  On Thu, 2013-05-23 at 12:59 +0000, Yong, Fan wrote:
  > Just make it match the "inode64" in nfs-utils parse_fsid(), which is defined as "unsigned long long", and the parsed_fsid:: inode is copied from "inode64" as following:
  > 
  > static int parse_fsid(int fsidtype, int fsidlen, char *fsid,
  >                 struct parsed_fsid *parsed)
  > {
  >         unsigned int dev;
  >         unsigned long long inode64;
  > ...
  >         case FSID_UUID16_INUM: /* 8 byte inode number and 16 byte uuid */
  >                 if (fsidlen != 24)
  >                         return -1;
  >                 memcpy(&inode64, fsid, 8);
  >                 parsed->inode = inode64;
  >                 parsed->uuidlen = 16;
  >                 parsed->fhuuid = fsid+8;
  >                 break;
  >         }
  > 
  > --
  > Cheers,
  > Nasf
  
  Eeeeeeeewww! This is _exactly_ why we should be using properly
  dimensioned types. Feel free to tell me how the value of 'inode64' is
  well defined on systems where sizeof(unsigned long long) != 8...

Is there any reason not to use ino_t?
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux