Le Sat, 17 Mar 2012 11:34:42 +0100 vous écriviez: > doesn't do "the right thing" and should be changed, but why does it > fails to you and works for me anyway? Either some of the debian > patches is the culprit, or some other non-vanilla extension like > SELinux. >
Here's a newer patch, that should take care of your problem (caveat: untried, I'm home and I don't even compiled it!) . -- ------------------------------------------------------------------------ Emmanuel Florac | Direction technique | Intellique | <eflo...@intellique.com> | +33 1 78 94 84 02 ------------------------------------------------------------------------
diff -u -a orangefs-2.8.5/src/kernel/linux-2.6//acl.c orangefs-2.8.5p1//src/kernel/linux-2.6//acl.c --- orangefs-2.8.5/src/kernel/linux-2.6//acl.c 2012-01-26 15:59:22.000000000 +0100 +++ orangefs-2.8.5p1//src/kernel/linux-2.6//acl.c 2012-03-07 15:34:22.331930001 +0100 @@ -279,7 +279,7 @@ name = PVFS2_XATTR_NAME_ACL_ACCESS; if (acl) { - mode_t mode = inode->i_mode; + umode_t mode = inode->i_mode; /* can we represent this with the UNIXy permission bits? */ error = posix_acl_equiv_mode(acl, &mode); /* uh oh some error.. */ @@ -603,8 +603,9 @@ } if (get_acl_flag(inode) == 1 && acl) { - struct posix_acl *clone; - mode_t mode; + /* struct posix_acl *clone; + mode_t mode; */ + umode_t mode = inode->i_mode; if (S_ISDIR(inode->i_mode)) { @@ -616,15 +617,16 @@ goto cleanup; } } - clone = posix_acl_clone(acl, GFP_KERNEL); + /* clone = posix_acl_clone(acl, GFP_KERNEL); error = -ENOMEM; if (!clone) { gossip_err("posix_acl_clone failed with ENOMEM\n"); ClearModeFlag(pvfs2_inode); goto cleanup; - } - mode = inode->i_mode; - error = posix_acl_create_masq(clone, &mode); + } */ + /* mode = inode->i_mode; + error = posix_acl_create_masq(clone, &mode); */ + error = posix_acl_create(&acl, GFP_KERNEL, &mode); if (error >= 0) { gossip_debug(GOSSIP_ACL_DEBUG, "posix_acl_create_masq changed mode " @@ -641,11 +643,12 @@ */ if (error > 0) { - error = pvfs2_set_acl(inode, ACL_TYPE_ACCESS, clone); + error = pvfs2_set_acl(inode, ACL_TYPE_ACCESS, acl); gossip_debug(GOSSIP_ACL_DEBUG, "pvfs2_set_acl (access) returned %d\n", error); } } - posix_acl_release(clone); + /* posix_acl_release(clone); */ + posix_acl_release(acl); } /* If mode of the inode was changed, then do a forcible ->setattr */ if (ModeFlag(pvfs2_inode)) @@ -664,7 +667,8 @@ */ int pvfs2_acl_chmod(struct inode *inode) { - struct posix_acl *acl, *clone; + /* struct posix_acl *acl, *clone; */ + struct posix_acl *acl; int error; if (get_acl_flag(inode) == 0) @@ -691,22 +695,23 @@ error = 0; goto out; } - clone = posix_acl_clone(acl, GFP_KERNEL); - posix_acl_release(acl); - if (!clone) + /* clone = posix_acl_clone(acl, GFP_KERNEL); + posix_acl_release(acl); */ + /*if (!clone) { gossip_err("pvfs2_acl_chmod failed with ENOMEM\n"); error = -ENOMEM; goto out; - } - error = posix_acl_chmod_masq(clone, inode->i_mode); + } */ + + error = posix_acl_chmod(&acl, GFP_KERNEL, inode->i_mode); if (!error) { - error = pvfs2_set_acl(inode, ACL_TYPE_ACCESS, clone); + error = pvfs2_set_acl(inode, ACL_TYPE_ACCESS, acl); gossip_debug(GOSSIP_ACL_DEBUG, "pvfs2_acl_chmod: pvfs2 set acl " "(access) returned %d\n", error); } - posix_acl_release(clone); + posix_acl_release(acl); out: return error; } @@ -763,11 +768,16 @@ #ifdef HAVE_GENERIC_PERMISSION int ret; - ret = generic_permission(inode, mask, + /* see include/linux/fs.h : kernel 2.6 3 params, + * 3.0 4 params, 3.1 and 3.2 2 params */ + ret = generic_permission(inode, mask #ifdef HAVE_FOUR_PARAM_GENERIC_PERMISSION - 0, + ,0 #endif /* HAVE_FOUR_PARAM_GENERIC_PERMISSION */ - pvfs2_check_acl); +#ifdef HAVE_THREE_PARAM_GENERIC_PERMISSION + ,pvfs2_check_acl +#endif /* HAVE_THREE_PARAM_GENERIC_PERMISSION */ + ); if (ret != 0) { gossip_debug(GOSSIP_ACL_DEBUG, "pvfs2_permission failed: inode: %llu mask = %o" Seulement dans orangefs-2.8.5/src/kernel/linux-2.6/: .acl.o.d Seulement dans orangefs-2.8.5/src/kernel/linux-2.6/: dcache.o Seulement dans orangefs-2.8.5/src/kernel/linux-2.6/: .dcache.o.cmd Seulement dans orangefs-2.8.5/src/kernel/linux-2.6/: devpvfs2-req.o Seulement dans orangefs-2.8.5/src/kernel/linux-2.6/: .devpvfs2-req.o.cmd Seulement dans orangefs-2.8.5/src/kernel/linux-2.6/: dir.o Seulement dans orangefs-2.8.5/src/kernel/linux-2.6/: .dir.o.cmd Seulement dans orangefs-2.8.5/src/kernel/linux-2.6/: file.o Seulement dans orangefs-2.8.5/src/kernel/linux-2.6/: .file.o.cmd Seulement dans orangefs-2.8.5/src/kernel/linux-2.6/: inode.o Seulement dans orangefs-2.8.5/src/kernel/linux-2.6/: .inode.o.cmd Seulement dans orangefs-2.8.5p1//src/kernel/linux-2.6/: modules.order Seulement dans orangefs-2.8.5p1//src/kernel/linux-2.6/: Module.symvers Seulement dans orangefs-2.8.5/src/kernel/linux-2.6/: namei.o Seulement dans orangefs-2.8.5/src/kernel/linux-2.6/: .namei.o.cmd Seulement dans orangefs-2.8.5/src/kernel/linux-2.6/: pvfs2-bufmap.o Seulement dans orangefs-2.8.5/src/kernel/linux-2.6/: .pvfs2-bufmap.o.cmd Seulement dans orangefs-2.8.5/src/kernel/linux-2.6/: pvfs2-cache.o Seulement dans orangefs-2.8.5/src/kernel/linux-2.6/: .pvfs2-cache.o.cmd Seulement dans orangefs-2.8.5/src/kernel/linux-2.6/: pvfs2-mod.o Seulement dans orangefs-2.8.5/src/kernel/linux-2.6/: .pvfs2-mod.o.cmd diff -u -a orangefs-2.8.5/src/kernel/linux-2.6//pvfs2-utils.c orangefs-2.8.5p1//src/kernel/linux-2.6//pvfs2-utils.c --- orangefs-2.8.5/src/kernel/linux-2.6//pvfs2-utils.c 2012-01-26 15:59:22.000000000 +0100 +++ orangefs-2.8.5p1//src/kernel/linux-2.6//pvfs2-utils.c 2012-03-17 11:37:39.549930001 +0100 @@ -285,7 +285,7 @@ * directories across clients; keep constant at 1. Why 1? If * we go with 2, then find(1) gets confused and won't work * properly withouth the -noleaf option */ - inode->i_nlink = 1; + set_nlink(inode, 1); ret = 0; break; case PVFS_TYPE_SYMLINK: Seulement dans orangefs-2.8.5/src/kernel/linux-2.6/: pvfs2-utils.o Seulement dans orangefs-2.8.5/src/kernel/linux-2.6/: .pvfs2-utils.o.cmd Seulement dans orangefs-2.8.5p1//src/kernel/linux-2.6/: .pvfs2-utils.o.d Seulement dans orangefs-2.8.5/src/kernel/linux-2.6/: super.o Seulement dans orangefs-2.8.5/src/kernel/linux-2.6/: .super.o.cmd Seulement dans orangefs-2.8.5p1//src/kernel/linux-2.6/: .symlink.c.swp Seulement dans orangefs-2.8.5/src/kernel/linux-2.6/: symlink.o Seulement dans orangefs-2.8.5/src/kernel/linux-2.6/: .symlink.o.cmd Les sous-répertoires orangefs-2.8.5/src/kernel/linux-2.6//.tmp_versions et orangefs-2.8.5p1//src/kernel/linux-2.6//.tmp_versions sont identiques. Seulement dans orangefs-2.8.5/src/kernel/linux-2.6/: xattr.o Seulement dans orangefs-2.8.5/src/kernel/linux-2.6/: .xattr.o.cmd
_______________________________________________ Pvfs2-developers mailing list Pvfs2-developers@beowulf-underground.org http://www.beowulf-underground.org/mailman/listinfo/pvfs2-developers