Dwight Engen | 19 Jun 2013 17:09
Picon
Favicon

[PATCH] userns: Convert xfs to use kuid/kgid where appropriate

Use uint32 from init_user_ns for xfs internal uid/gid representation in
acl, xfs_icdinode. Conversion of kuid/gid is done at the vfs boundary,
other user visible xfs specific interfaces (bulkstat, eofblocks filter)
expect uint32 init_user_ns uid/gid values.

Signed-off-by: Dwight Engen <dwight.engen <at> oracle.com>
---
 fs/xfs/xfs_acl.c      | 24 ++++++++++++++++++++----
 fs/xfs/xfs_fs.h       |  4 ++--
 fs/xfs/xfs_icache.c   |  2 +-
 fs/xfs/xfs_inode.c    |  6 +++---
 fs/xfs/xfs_ioctl.c    |  2 +-
 fs/xfs/xfs_iops.c     | 38 ++++++++++++++++++++------------------
 fs/xfs/xfs_qm.c       | 16 ++++++++--------
 fs/xfs/xfs_quota.h    |  9 +++++----
 fs/xfs/xfs_symlink.c  |  4 +++-
 fs/xfs/xfs_vnodeops.c |  4 +++-
 init/Kconfig          | 13 -------------
 11 files changed, 66 insertions(+), 56 deletions(-)

diff --git a/fs/xfs/xfs_acl.c b/fs/xfs/xfs_acl.c
index 306d883..fd2854e 100644
--- a/fs/xfs/xfs_acl.c
+++ b/fs/xfs/xfs_acl.c
 <at>  <at>  -68,14 +68,17  <at>  <at>  xfs_acl_from_disk(

 		switch (acl_e->e_tag) {
 		case ACL_USER:
+			acl_e->e_uid = make_kuid(&init_user_ns,
+						 be32_to_cpu(ace->ae_id));
(Continue reading)

Wang Sheng-Hui | 19 Jun 2013 09:38
Picon

[PATCH] xfstests: add 'check -btrfs' support

Currently we can specify the testing filesytems like 'check -xfs', but
btrfs is not support in this kind of command option. Add the option
'check -btrfs' support.

Signed-off-by: Wang Sheng-Hui <shhuiw <at> gmail.com>
---
  check |    2 ++
  1 file changed, 2 insertions(+)

diff --git a/check b/check
index ff8fbcf..9c40615 100755
--- a/check
+++ b/check
 <at>  <at>  -74,6 +74,7  <at>  <at>  usage()

  check options
      -xfs                test XFS (default)
+    -btrfs              test Btrfs
      -udf                test UDF
      -nfs                test NFS
      -l			line mode diff
 <at>  <at>  -162,6 +163,7  <at>  <at>  while [ $# -gt 0 ]; do
  	-udf)	FSTYP=udf ;;
  	-xfs)	FSTYP=xfs ;;
  	-nfs)	FSTYP=nfs ;;
+	-btrfs) FSTYP=btrfs ;;

  	-g)	group=$2 ; shift ;
  		group_list=$(get_group_list $group)
--

-- 
(Continue reading)

Dave Chinner | 19 Jun 2013 07:35

[PATCH 00/50] xfsprogs: patch queue for crc-dev

Hi folks,

This is the latest patchset for the crc-dev branch of xfsprogs.
It follows up on the last series of 22 patches to get libxf sin sync
with the kernel code but adding all the changes from the kernel size
to remove __KERNEL__ from the code. Hence there's a fair bit more
code churn in the patch set, but overall the diffstat is a
significant reduction in code in libxfs. Like the kernel side
patchset, there is a lot of new files that are shared with the
kernel, and the diffstat reflects that:

90 files changed, 3573 insertions(+), 4863 deletions(-)
 rename include/{xfs_buf_item.h => xfs_buf_item_format.h} (62%)
 delete mode 100644 include/xfs_dfrag.h
 create mode 100644 include/xfs_dquot_format.h
 rename include/{xfs_extfree_item.h => xfs_extfree_item_format.h} (69%)
 create mode 100644 include/xfs_icreate_item.h
 create mode 100644 include/xfs_icreate_item_format.h
 delete mode 100644 include/xfs_inode.h
 create mode 100644 include/xfs_inode_buf.h
 create mode 100644 include/xfs_inode_fork.h
 rename include/{xfs_inode_item.h => xfs_inode_item_format.h} (61%)
 delete mode 100644 include/xfs_log.h
 create mode 100644 include/xfs_log_format.h
 delete mode 100644 include/xfs_log_priv.h
 delete mode 100644 include/xfs_mount.h
 delete mode 100644 include/xfs_quota.h
 create mode 100644 include/xfs_quota_defs.h
 delete mode 100644 include/xfs_rtalloc.h
 create mode 100644 include/xfs_rtalloc_defs.h
(Continue reading)

Dave Chinner | 19 Jun 2013 06:50

[PATCH 00/60] xfs: patch queue for 3.11

Hi Folks,

This is my patch queue for 3.11 as it stands right now.

The first 27 patches have been posted previously, and I've addressed
these comments directly:

	- non-debug static function prblems (Brian)
	- agblock_t in xfs-ialloc.c (Brian)
	- xfs-dir2_format.h changes reverted, now included before
	  xfs_dir2.h (Christoph)
	- rename xfs_aops_punch_delalloc_range() (Christoph)

The next set of patches then build on this and implement the first
part of where the discussions went - the removal of __KERNEL__ from
all the XFS code. This generally takes the form of:

	- split on-disk format definitions into a separate header
	- include the header in the original it came from
	- share the new header file with userspace
	- repeat until all definitions are split out and the only
	  thing is left in the orignal header is #includes and
	  ifdef __KERNEL__ sections.
	- remove the ifdef __KERNEL__, as this header file is no
	  longer shared with userspace.

The same process is done for the .c files, resulting in .c files
that contain only kernel code or only code shared with libxfs in
userspace.

(Continue reading)

Chandra Seetharaman | 19 Jun 2013 00:59
Picon
Favicon

WANTED: xfstests results in different architectures

Hello All,

Couple of weeks backs we had a discussion in xfs meeting to collect
xfstests results. I volunteered to collect xfstests results from
different architectures and upload to XFS.org.

I can run and get the results for x86_64 and ppc64. If anyone has other
architectures that they can run the tests on and provide me the results,
I will filter them an upload to XFS.org.

Here is what I think would be of value to provide along with the results
(others, please feel free to add more to the list for the results to be
more useful)
    - Architecture of the system
    - Configuration - memory size and number of procs
    - Filesystem sizes
    - Commit ID of the kernel
    - which git tree (XFS git tree or Linus's)
    - xfsprogs version (or commit ID if from the git tree)

Thanks for your help in advance.

Regards,

Chandra

_______________________________________________
xfs mailing list
xfs <at> oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
(Continue reading)

Dave Kleikamp | 19 Jun 2013 00:57
Picon
Favicon

[PATCH] xfstests: aio-stress is calling pthread_join incorrectly

The retval parameter to pthread_join() is a pointer to a pointer.
aio-stress is passing in a pointer to an int. This can result in a bus
error on sparc64 when the pointer is not aligned on a 64-bit boundary.
Since the return value is not used, it is simplest to pass a NULL
pointer instead.

This has been fixed in the LTP source:
https://github.com/linux-test-project/ltp/commit/981d33aad3b33c4625b88990fbf2fad5470d47e0

Signed-off-by: Dave Kleikamp <dave.kleikamp <at> oracle.com>
---

diff -up xfstests/ltp/aio-stress.c.orig xfstests/ltp/aio-stress.c
--- xfstests/ltp/aio-stress.c.orig	2013-06-03 11:53:49.000000000 -0700
+++ xfstests/ltp/aio-stress.c	2013-06-18 15:04:35.593859720 -0700
 <at>  <at>  -1210,7 +1210,6  <at>  <at>  typedef void * (*start_routine)(void *);
 int run_workers(struct thread_info *t, int num_threads)
 {
     int ret;
-    int thread_ret;
     int i;

     for(i = 0 ; i < num_threads ; i++) {
 <at>  <at>  -1221,7 +1220,7  <at>  <at>  int run_workers(struct thread_info *t, i
 	}
     }
     for(i = 0 ; i < num_threads ; i++) {
-        ret = pthread_join(t[i].tid, (void *)&thread_ret);
+        ret = pthread_join(t[i].tid, NULL);
         if (ret) {
(Continue reading)

Roland | 18 Jun 2013 19:00

Re:Urea,Potassium sulfate

Dear Manager,
 
Our company can export Urae 46%, Potassium sulfate,in China.

If need ,please contract us.

Thanks,
 
Roland ,
 
Roland,
Hengshui Maosen Import & Export Co.,Ltd
Add:No.321 Shengli west Road,Taocheng District,Hengshui City ,China.
Tel:86-0318-87887932
Fax:86-0318-87328743
Email :roland <at> hsmaosen.com
Skype:rolandhmy
 
 
 
 
 
 
_______________________________________________
xfs mailing list
xfs <at> oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
Carlos Maiolino | 18 Jun 2013 17:32
Picon
Favicon

[PATCH] xfs: fix sgid inheritance for subdirectories inheriting default acls [V2]

XFS removes sgid bits of subdirectories under a directory containing a default
acl.

When a default acl is set, it implies xfs to call xfs_setattr_nonsize() in its
code path. Such function is shared among mkdir and chmod system calls, and
does some checks unneeded by mkdir (calling inode_change_ok()). Such checks
remove sgid bit from the inode after it has been granted.

With this patch, we extend the meaning of XFS_ATTR_NOACL flag to avoid these
checks when acls are being inherited (thanks hch).

Also, xfs_setattr_mode, doesn't need to re-check for group id and capabilities
permissions, this only implies in another try to remove sgid bit from the
directories. Such check is already done either on inode_change_ok() or
xfs_setattr_nonsize().

Changelog:

V2: Extends the meaning of XFS_ATTR_NOACL instead of wrap the tests into another
    function

Signed-off-by: Carlos Maiolino <cmaiolino <at> redhat.com>
---
 fs/xfs/xfs_iops.c |   27 ++++++++++++++-------------
 1 files changed, 14 insertions(+), 13 deletions(-)

diff --git a/fs/xfs/xfs_iops.c b/fs/xfs/xfs_iops.c
index ca9ecaa..3547d89 100644
--- a/fs/xfs/xfs_iops.c
+++ b/fs/xfs/xfs_iops.c
 <at>  <at>  -467,9 +467,6  <at>  <at>  xfs_setattr_mode(
 	ASSERT(tp);
 	ASSERT(xfs_isilocked(ip, XFS_ILOCK_EXCL));

-	if (!in_group_p(inode->i_gid) && !capable(CAP_FSETID))
-		mode &= ~S_ISGID;
-
 	ip->i_d.di_mode &= S_IFMT;
 	ip->i_d.di_mode |= mode & ~S_IFMT;

 <at>  <at>  -495,15 +492,18  <at>  <at>  xfs_setattr_nonsize(

 	trace_xfs_setattr(ip);

-	if (mp->m_flags & XFS_MOUNT_RDONLY)
-		return XFS_ERROR(EROFS);
+	/* If acls are being inherited, we already have this checked */
+	if (!(flags & XFS_ATTR_NOACL)) {
+		if (mp->m_flags & XFS_MOUNT_RDONLY)
+			return XFS_ERROR(EROFS);

-	if (XFS_FORCED_SHUTDOWN(mp))
-		return XFS_ERROR(EIO);
+		if (XFS_FORCED_SHUTDOWN(mp))
+			return XFS_ERROR(EIO);

-	error = -inode_change_ok(inode, iattr);
-	if (error)
-		return XFS_ERROR(error);
+		error = -inode_change_ok(inode, iattr);
+		if (error)
+			return XFS_ERROR(error);
+	}

 	ASSERT((mask & ATTR_SIZE) == 0);

 <at>  <at>  -594,9 +594,10  <at>  <at>  xfs_setattr_nonsize(
 		 * The set-user-ID and set-group-ID bits of a file will be
 		 * cleared upon successful return from chown()
 		 */
-		if ((ip->i_d.di_mode & (S_ISUID|S_ISGID)) &&
-		    !capable(CAP_FSETID))
-			ip->i_d.di_mode &= ~(S_ISUID|S_ISGID);
+		if (!S_ISDIR(inode->i_mode))
+			if ((ip->i_d.di_mode & (S_ISUID|S_ISGID)) &&
+			    !capable(CAP_FSETID))
+				ip->i_d.di_mode &= ~(S_ISUID|S_ISGID);

 		/*
 		 * Change the ownerships and register quota modifications
--

-- 
1.7.1

_______________________________________________
xfs mailing list
xfs <at> oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

Dave Chinner | 18 Jun 2013 15:23

Re: dmsetup arguments

On Tue, Jun 18, 2013 at 04:08:44PM +0400, alexander.tsvetkov <at> oracle.com wrote:
> On 06/18/13 05:26, Dave Chinner wrote:
> >On Fri, Jun 14, 2013 at 12:51:25PM +0400, alexander.tsvetkov <at> oracle.com wrote:
> >>Hi,
> >>
> >>XFStests suite generic/311 test fails on command: "sbin/dmsetup load
> >>flakey-test --table "0 150000001 flakey /dev/sdc2 0 0 180 1
> >>drop_writes" with error: "device-mapper: reload ioctl on flakey-test
> >>failed: Invalid argument", so as I understand the command format
> >>provided to ioctl is incorrect here. Kernel logs has message:
> >>
> >>"Jun 13 16:47:15 tests kernel: device-mapper: table: 252:3: flakey:
> >>dm-flakey: Invalid argument count
> >>Jun 13 16:47:15 tests kernel: device-mapper: ioctl: error adding
> >>target to table"
> >What kernel and version of dmsetup are you using? If it is too old
> >to support the flakey target, then we need a new require rule check
> >for the test to avoid old versions of dmsetup...
>
> Kernel version is 2.6.39, version of device-mapper-libs is 1.02.77.

So it's an old version of both the kernel and DM, so it's probably
not been tested at all. Like I said - it probably needs a better
check in _require_dm_flakey() to determine if the test should be run
or not.

Patches are welcome...

Cheers,

Dave.

PS: please reply-to-all for mailing list traffic, not by private
email. I've re-added the XFS list to the CC list.

PPS: Top posting destroys the context of your reply - nobody has any
idea of what part of the previous message you are responding to.
Repsonding inline is much easier to follow with when conversions get
long...
--

-- 
Dave Chinner
david <at> fromorbit.com

_______________________________________________
xfs mailing list
xfs <at> oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

Dave Chinner | 18 Jun 2013 05:40

[PATCH] xfsprogs: fix make deb

From: Dave Chinner <dchinner <at> redhat.com>

Commit 48212a30 ("xfsprogs: update 'make deb' to use tarball) fixed
a bunch of problems with making the source tarball for releases.
However, it broke the debian package builds in a way I hadn't
noticed until I rewrote my CI system build script.

I noticed that the CI system wasn't building from a pristine
workarea, and instead was just updating the old workarea and running
'make deb'. I added a 'make realclean' to remove all previous state
from the workarea, and then 'make deb' started failing with errors
building the tarball because po/xfsprogs.pot didn't have a build
rule

The above commit removed the pre-build of the translations target,
and instead made the translation build target a dependency of
building the the tarball. Hence the lack of a build rule of the
translations causes the source tarball build to fail.

Signed-off-by: Dave Chinner <dchinner <at> redhat.com>
---
 Makefile |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/Makefile b/Makefile
index b73bb57..f56aebd 100644
--- a/Makefile
+++ b/Makefile
 <at>  <at>  -135,6 +135,8  <at>  <at>  deb: include/builddefs include/platform_defs.h
 ifeq ($(HAVE_BUILDDEFS), no)
 	$(Q)$(MAKE) $(MAKEOPTS) -C . $ <at> 
 else
+	# need to build translations before the source tarball
+	$(Q)$(MAKE) $(MAKEOPTS) -C po
 	$(Q)$(MAKE) $(MAKEOPTS) $(SRCDIR)
 	$(Q)cd $(SRCDIR) && dpkg-buildpackage
 endif
--

-- 
1.7.10.4

_______________________________________________
xfs mailing list
xfs <at> oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

xfs | 18 Jun 2013 01:02
Picon
Favicon

[XFS updates] XFS development tree branch, for-next, updated. v3.10-rc1-36-g1ebdf36

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "XFS development tree".

The branch, for-next has been updated
  1ebdf36 xfs: Remove struct xfs_chash from xfs_mount
  34d7f60 xfs: Don't keep silent if sunit/swidth can not be changed via mount
  897366f xfs: Remove redundant error variable from xfs_growfs_data_private()
  b2410e9 xfs: Convert use of typedef ctl_table to struct ctl_table
      from  9222a9cf86c0d64ffbedf567412b55da18763aa3 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 1ebdf3611c8968e7202c47c2dcb2d36986c44cb0
Author: Jeff Liu <jeff.liu <at> oracle.com>
Date:   Thu May 2 19:23:20 2013 +0800

    xfs: Remove struct xfs_chash from xfs_mount

    Remove struct xfs_chash from struct xfs_mount as there is no user of
    it nowadays.

    Signed-off-by: Jie Liu <jeff.liu <at> oracle.com>
    Reviewed-by: Dave Chinner <dchinner <at> redhat.com>
    Reviewed-by: Mark Tinguely <tinguely <at> sgi.com>
    Signed-off-by: Ben Myers <bpm <at> sgi.com>

commit 34d7f603b93be0ac38c2464219f5a2795d76c8ee
Author: Jie Liu <jeff.liu <at> oracle.com>
Date:   Thu May 2 19:27:53 2013 +0800

    xfs: Don't keep silent if sunit/swidth can not be changed via mount

    As per the mount man page, sunit and swidth can be changed via
    mount options.  For XFS, on the face of it, those options seems
    works if the specified alignments is properly, e.g.
    # mount -o sunit=4096,swidth=8192 /dev/sdb1 /mnt
    # mount | grep sdb1
    /dev/sdb1 on /mnt type xfs (rw,sunit=4096,swidth=8192)

    However, neither sunit nor swidth is shown from the xfs_info output.
    # xfs_info /mnt
    meta-data=/dev/sdb1    isize=256    agcount=4, agsize=262144 blks
             =             sectsz=512   attr=2
    data     =             bsize=4096   blocks=1048576, imaxpct=25
             =             sunit=0      swidth=0 blks
    		       ^^^^^^^^^^^^^^^^^^^^^^^^^^
    naming   =version 2    bsize=4096   ascii-ci=0
    log      =internal     bsize=4096   blocks=2560, version=2
             =             sectsz=512   sunit=0 blks, lazy-count=1
    realtime =none         extsz=4096   blocks=0, rtextents=0

    The reason is that the alignment can only be changed if the relevant
    super block is already configured with alignments, otherwise, the
    given value is silently ignored.

    With this fix, the attempt to mount a storage without strip alignment
    setup on a super block will get an error with a warning in syslog to
    indicate the true cause, e.g.
    # mount -o sunit=4096,swidth=8192 /dev/sdb1 /mnt
    mount: wrong fs type, bad option, bad superblock on /dev/sdb1,
           missing codepage or helper program, or other error
           In some cases useful info is found in syslog - try
    	dmesg | tail  or so
    .......
    XFS (sdb1): cannot change alignment: superblock does not support data
    alignment

    Signed-off-by: Jie Liu <jeff.liu <at> oracle.com>
    Cc: Mark Tinguely <tinguely <at> sgi.com>
    Cc: Dave Chinner <dchinner <at> redhat.com>
    Reviewed-by: Mark Tinguely <tinguely <at> sgi.com>
    Signed-off-by: Ben Myers <bpm <at> sgi.com>

commit 897366f0e4bdc320ade81c3c4035977c99de9aad
Author: Jie Liu <jeff.liu <at> oracle.com>
Date:   Tue May 14 22:50:21 2013 +0800

    xfs: Remove redundant error variable from xfs_growfs_data_private()

    Commit eab4e633 "xfs: uncached buffer reads need to return an error".

    Remove redundant error variable, using the function level error variable
    to store bp->b_error instead.

    Signed-off-by: Jie Liu <jeff.liu <at> oracle.com>
    Reviewed-by: Ben Myers <bpm <at> sgi.com>
    Signed-off-by: Ben Myers <bpm <at> sgi.com>

commit b2410e92b70507e054deb6cdb605ee1d61fc7c95
Author: Joe Perches <joe <at> perches.com>
Date:   Thu Jun 13 19:37:50 2013 -0700

    xfs: Convert use of typedef ctl_table to struct ctl_table

    This typedef is unnecessary and should just be removed.

    Signed-off-by: Joe Perches <joe <at> perches.com>
    Acked-by: Dave Chinner <dchinner <at> redhat.com>
    Reviewed-by: Ben Myers <bpm <at> sgi.com>
    Signed-off-by: Ben Myers <bpm <at> sgi.com>

-----------------------------------------------------------------------

Summary of changes:
 fs/xfs/xfs_fsops.c  |  2 +-
 fs/xfs/xfs_mount.c  |  4 ++++
 fs/xfs/xfs_mount.h  |  2 --
 fs/xfs/xfs_sysctl.c | 26 +++++++++++++-------------
 4 files changed, 18 insertions(+), 16 deletions(-)

hooks/post-receive
--

-- 
XFS development tree

_______________________________________________
xfs mailing list
xfs <at> oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs


Gmane