AFS + chown

Love lha at stacken.kth.se
Sat Aug 17 00:22:10 CEST 2002


Love <lha at stacken.kth.se> writes:

> I just can't figure out the maze in the openafs fileserver, guess I have
> to single-step it so I can figure out what its doing.

Ok, the problem seems to be that you can't do a RXAFSStoreData that update
owner,UnixMode bits.

This passes our fast regression tests, running the not-that-fast regression
tests right now. Can you tell me if this fixes your problem ?

Love

Index: messages.c
===================================================================
RCS file: /afs/stacken.kth.se/src/SourceRepository/arla/arlad/messages.c,v
retrieving revision 1.296
diff -u -r1.296 messages.c
--- messages.c  2002/08/16 18:25:41     1.296
+++ messages.c  2002/08/16 22:09:32
@@ -614,12 +614,24 @@
 
      assert_kernelp(entry);
 
-     do {
-        if (XA_VALID_SIZE(&h->attr))
+     /* FIXME: write comment here */
+
+     if (XA_VALID_SIZE(&h->attr)) {
+        AFSStoreStatus null_status;
+        memset(&null_status, 0, sizeof(null_status));
+        do {
             ret = cm_ftruncate (entry, h->attr.xa_size, &status, ce);
-        else
+        } while (try_again (&ret, &ce, &h->cred, &fid));
+     }
+
+     if (ret)
+        goto out;
+
+     if (status.Mask) {
+        do {
             ret = cm_setattr(entry, &status, ce);
-     } while (try_again (&ret, &ce, &h->cred, &fid));
+        } while (try_again (&ret, &ce, &h->cred, &fid));
+     }
 
      if (ret)
         goto out;





More information about the Arla-drinkers mailing list