Christoph Hellwig | 1 Aug 16:15 2010

Re: [PATCH] xfstests: include NIS databases

On Fri, Jul 30, 2010 at 04:52:39PM -0500, Alex Elder wrote:
> If NIS is active on a test target system, additional password and
> group file information is available via their respective databases
> in NIS.  Currently, some tests assume that /etc/passwd and /etc/group
> are the only places to find this information.
> 
> This patch causes both the local database and the NIS database (if
> one is likely to be present) to be consulted for needed information.
> 
> Signed-off-by: Alex Elder <aelder <at> sgi.com>

Looks good,

Reviewed-by: Christoph Hellwig <hch <at> lst.de>

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

Christoph Hellwig | 1 Aug 16:15 2010

Re: [PATCH] xfstests: have getfacl(1) report numeric id's

On Fri, Jul 30, 2010 at 04:54:23PM -0500, Alex Elder wrote:
> This patch arranges for calls to getfacl(1) to be given the "-n"
> flag, which requests that user and group id's be listed numerically
> rather than using names.  The affected test output files are also
> updated to indicate the effect of the change.
> 
> This eliminates some spurious output differences I was seeing, due
> to the presence of NIS in my test environment.
> 
> Signed-off-by: Alex Elder <aelder <at> sgi.com>

Looks good,

Reviewed-by: Christoph Hellwig <hch <at> lst.de>

I wonder if this usage should be documented somewhere for future tests.

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

Dave Chinner | 2 Aug 09:25 2010

[PATCH 1/2] dio: track and serialise unaligned direct IO

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

If we get two unaligned direct IO's to the same filesystem block
that is marked as a new allocation (i.e. buffer_new), then both IOs
will zero the portion of the block they are not writing data to. As
a result, when the IOs complete there will be a portion of the block
that contains zeros from the last IO to complete rather than the
data that should be there.

This is easily manifested by qemu using aio+dio with an unaligned
guest filesystem - every IO is unaligned and fileystem corruption is
encountered in the guest filesystem. xfstest 240 (from Eric Sandeen)
is also a simple reproducer.

To avoid this problem, track unaligned IO that triggers sub-block
zeroing and check new incoming unaligned IO that require sub-block
zeroing against that list. If we get an overlap where the start and
end of unaligned IOs hit the same filesystem block, then we need to
block the incoming IOs until the IO that is zeroing the block
completes. The blocked IO can then continue without needing to do
any zeroing and hence won't overwrite valid data with zeros.

Signed-off-by: Dave Chinner <dchinner <at> redhat.com>
---
 fs/direct-io.c |  152 +++++++++++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 146 insertions(+), 6 deletions(-)

diff --git a/fs/direct-io.c b/fs/direct-io.c
index a10cb91..611524e 100644
--- a/fs/direct-io.c
(Continue reading)

Dave Chinner | 2 Aug 09:25 2010

[PATCH 2/2] dio: scale unaligned IO tracking via multiple lists

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

To avoid concerns that a single list and lock tracking the unaligned IOs
will not scale appropriately, create multiple lists and locks and chose them by
hashing the unaligned block being zeroed.

Signed-off-by: Dave Chinner <dchinner <at> redhat.com>
---
 fs/direct-io.c |   53 ++++++++++++++++++++++++++++++++++++++++-------------
 1 files changed, 40 insertions(+), 13 deletions(-)

diff --git a/fs/direct-io.c b/fs/direct-io.c
index 611524e..95dcba4 100644
--- a/fs/direct-io.c
+++ b/fs/direct-io.c
 <at>  <at>  -152,8 +152,29  <at>  <at>  struct dio_zero_block {
 	atomic_t	ref;		/* reference count */
 };

-DEFINE_SPINLOCK(dio_zero_block_lock);
-LIST_HEAD(dio_zero_block_list);
+#define DIO_ZERO_BLOCK_NR	37LL
+struct dio_zero_block_head {
+	struct list_head	list;
+	spinlock_t		lock;
+};
+
+struct dio_zero_block_head dio_zero_blocks[DIO_ZERO_BLOCK_NR];
+#define to_dio_zero_list(zb)	(&dio_zero_blocks[zb % DIO_ZERO_BLOCK_NR].list)
+#define to_dio_zero_lock(zb)	(&dio_zero_blocks[zb % DIO_ZERO_BLOCK_NR].lock)
(Continue reading)

Dave Chinner | 2 Aug 09:25 2010

[PATCH 0/2] dio: serialise unaligned direct IO V2

The first patch is unchanged from the first posting. The second patch adds
multiple lists and locks to avod potential scalability issues with a single
list. This is just a simple hash based on the block address being zeroed.

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

Christoph Hellwig | 2 Aug 11:30 2010

Re: [PATCH 1/2] dio: track and serialise unaligned direct IO

> +DEFINE_SPINLOCK(dio_zero_block_lock);
> +LIST_HEAD(dio_zero_block_list);

These two should be static.

Otherwise looks good,

Reviewed-by: Christoph Hellwig <hch <at> lst.de>

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

Christoph Hellwig | 2 Aug 11:32 2010

Re: [PATCH 2/2] dio: scale unaligned IO tracking via multiple lists

On Mon, Aug 02, 2010 at 05:25:45PM +1000, Dave Chinner wrote:
> From: Dave Chinner <dchinner <at> redhat.com>
> 
> To avoid concerns that a single list and lock tracking the unaligned IOs
> will not scale appropriately, create multiple lists and locks and chose them by
> hashing the unaligned block being zeroed.
> 
> Signed-off-by: Dave Chinner <dchinner <at> redhat.com>
> ---
>  fs/direct-io.c |   53 ++++++++++++++++++++++++++++++++++++++++-------------
>  1 files changed, 40 insertions(+), 13 deletions(-)
> 
> diff --git a/fs/direct-io.c b/fs/direct-io.c
> index 611524e..95dcba4 100644
> --- a/fs/direct-io.c
> +++ b/fs/direct-io.c
>  <at>  <at>  -152,8 +152,29  <at>  <at>  struct dio_zero_block {
>  	atomic_t	ref;		/* reference count */
>  };
>  
> -DEFINE_SPINLOCK(dio_zero_block_lock);
> -LIST_HEAD(dio_zero_block_list);
> +#define DIO_ZERO_BLOCK_NR	37LL
> +struct dio_zero_block_head {
> +	struct list_head	list;
> +	spinlock_t		lock;
> +};
> +
> +struct dio_zero_block_head dio_zero_blocks[DIO_ZERO_BLOCK_NR];

(Continue reading)

xfs | 2 Aug 20:02 2010
Picon

[XFS updates] XFS development tree branch, master, updated. v2.6.34-10537-g6b0a299

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, master has been updated
      from  209fb87a259ead17e966627b7f053d16a96898da (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 -----------------------------------------------------------------
-----------------------------------------------------------------------

Summary of changes:

hooks/post-receive
--

-- 
XFS development tree

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

Alex Elder | 2 Aug 19:47 2010
Picon

Re: [PATCH] xfstests: have getfacl(1) report numeric id's

On Sun, 2010-08-01 at 10:15 -0400, Christoph Hellwig wrote:
> On Fri, Jul 30, 2010 at 04:54:23PM -0500, Alex Elder wrote:
> > This patch arranges for calls to getfacl(1) to be given the "-n"
> > flag, which requests that user and group id's be listed numerically
> > rather than using names.  The affected test output files are also
> > updated to indicate the effect of the change.
> > 
> > This eliminates some spurious output differences I was seeing, due
> > to the presence of NIS in my test environment.
> > 
> > Signed-off-by: Alex Elder <aelder <at> sgi.com>
> 
> Looks good,
> 
> 
> Reviewed-by: Christoph Hellwig <hch <at> lst.de>
> 
> I wonder if this usage should be documented somewhere for future tests.
> 

Same goes for the use of _cat_passwd and _cat_group.
I'll add something to the "README" file in the "Test
script environment" section and will post that shortly.

					-Alex

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

Alex Elder | 2 Aug 19:51 2010
Picon

[PATCH] xfstests: update README file to document some recent changes

Update the README file to document the new _cat_passwd and
_cat_group functions, and to recommend passing "-n" to
getfacl(1) so it produces numeric output.

Signed-off-by: Alex Elder <aelder <at> sgi.com>

---
 README |   14 ++++++++++++++
 1 file changed, 14 insertions(+)

Index: b/README
===================================================================
--- a/README
+++ b/README
 <at>  <at>  -160,6 +160,20  <at>  <at>  Test script environment:
 				  string DATE for deterministic
 				  output

+	_cat_passwd,		- dump the content of the password
+	_cat_group		  or group file (both the local file
+				  and the content of the NIS database
+				  if it is likely to be present)
+
+     4. General recommendations, usage conventions, etc.:
+	- When the content of the password or group file is
+	  required, get it using the _cat_passwd and _cat_group
+	  functions, to ensure NIS information is included if NIS
+	  is active.
+	- When calling getfacl in a test, pass the "-n" argument so
+	  that numeric rather than symbolic identifiers are used in
(Continue reading)


Gmane