Whamcloud - gitweb
b=585183
authorpschwan <pschwan>
Mon, 12 Aug 2002 21:26:05 +0000 (21:26 +0000)
committerpschwan <pschwan>
Mon, 12 Aug 2002 21:26:05 +0000 (21:26 +0000)
commit2b61ee8dc31f1a0e2725234eb319fda7e3166891
tree70362a286619c186cd79b7c806cf83ca2267ebff
parent3f68263ada3283374376a830408b5b141968a07d
b=585183
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
13 files changed:
lustre/include/linux/lustre_idl.h
lustre/include/linux/lustre_mds.h
lustre/ldlm/ldlm_lock.c
lustre/lib/mds_updates.c
lustre/llite/file.c
lustre/llite/namei.c
lustre/mdc/mdc_reint.c
lustre/mdc/mdc_request.c
lustre/mds/handler.c
lustre/mds/mds_reint.c
lustre/obdclass/genops.c
lustre/osc/osc_request.c
lustre/scripts/dodiff.sh [new file with mode: 0755]