mdd_declare_create() mistakenly declares attr set for child with
parent attr, as will cause truncate operation.
Signed-off-by: Lai Siyao <lai.siyao@intel.com>
Change-Id: I79dbbb2b52e1d41aaa70c36ce6c197ab2cd684d8
Reviewed-on: http://review.whamcloud.com/4956
Reviewed-by: Prakash Surya <surya1@llnl.gov>
Tested-by: Hudson
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
struct thandle *handle,
const struct md_op_spec *spec)
{
- struct mdd_thread_info *info = mdd_env_info(env);
- int rc = 0;
+ int rc;
rc = mdd_declare_object_create_internal(env, p, c, attr, handle, spec);
if (rc)
GOTO(out, rc);
}
- rc = mdo_declare_attr_set(env, c, &info->mti_pattr, handle);
+ rc = mdo_declare_attr_set(env, c, attr, handle);
if (rc)
GOTO(out, rc);
--- /dev/null
+LU-2561 newly created file is same size as directory
+
+ $ mkdir 2561
+ $ cd 2561
+ $ getfacl --access . | setfacl -d -M- .
+ $ touch f1
+ $ ls -s f1
+ > 0 f1
+ $ rm -rf 2561
+
LU-974 ignore umask when default acl with mask is set
$ umask 022
- $ mkdir d
+ $ mkdir 974
- $ touch d/f1
- $ ls -dl d/f1 | awk '{ print $1 }'
+ $ touch 974/f1
+ $ ls -dl 974/f1 | awk '{ print $1 }'
> -rw-r--r--
- $ setfacl -R -d -m mask:007 d
- $ touch d/f2
- $ ls -dl d/f2 | awk '{ print $1 }'
+ $ setfacl -R -d -m mask:007 974
+ $ touch 974/f2
+ $ ls -dl 974/f2 | awk '{ print $1 }'
> -rw-rw-r--+
$ umask 077
$ touch f3
$ ls -dl f3 | awk '{ print $1 }'
> -rw-------
+
+ $ rm -rf 974
rm -f make-tree
echo "LU-974 ignore umask when acl is enabled..."
- mkdir $DIR/974
- cd $DIR/974
run_acl_subtest 974 || error "LU-974 test failed"
- rm -rf $DIR/974
+
+ echo "LU-2561 newly created file is same size as directory..."
+ run_acl_subtest 2561 || error "LU-2561 test failed"
cd $SAVE_PWD
umask $SAVE_UMASK