Skip to content
Snippets Groups Projects
  • Phil Schwan's avatar
    2b61ee8d
    b=585183 · 2b61ee8d
    Phil Schwan authored
    We weren't telling the MDS what kind of unlink we were doing (unlink vs.
    rmdir), so, for example, if you called rmdir() on a file, the MDS would
    remove it and then the client VFS would return -ENODIR.  Not so good.
    
    We send a 'mode' flag along with the unlink request now, that must be one of
    S_IFDIR or S_IFREG.
    
    I also fixed some unaligned structures in the MDS protocol, so if you update
    one node you must UPDATE THEM ALL.
    
    Minutiae:
    - in the intent policy function, if mds_reint returns EISDIR or ENOTDIR, still
      go ahead and send back the file attributes
    - in mds_reint_unlink, use the mode sent over the wire instead of the actual
      inode mode to determine which vfs unlink function to call
    2b61ee8d
    History
    b=585183
    Phil Schwan authored
    We weren't telling the MDS what kind of unlink we were doing (unlink vs.
    rmdir), so, for example, if you called rmdir() on a file, the MDS would
    remove it and then the client VFS would return -ENODIR.  Not so good.
    
    We send a 'mode' flag along with the unlink request now, that must be one of
    S_IFDIR or S_IFREG.
    
    I also fixed some unaligned structures in the MDS protocol, so if you update
    one node you must UPDATE THEM ALL.
    
    Minutiae:
    - in the intent policy function, if mds_reint returns EISDIR or ENOTDIR, still
      go ahead and send back the file attributes
    - in mds_reint_unlink, use the mode sent over the wire instead of the actual
      inode mode to determine which vfs unlink function to call