Re: Correct semantics in rm -rf ?

2009-08-26 Thread shailesh jain
On Wed, Aug 26, 2009 at 3:07 PM, Jim Meyering wrote: > shailesh jain wrote: > > I have attached a log file. Note I have ran this on local file system > where > > rm -rf works not on Network file system (I was running into some issues > > which I am trying to resolve ..). However, this run also g

Re: Correct semantics in rm -rf ?

2009-08-26 Thread shailesh jain
I have attached a log file. Note I have ran this on local file system where rm -rf works not on Network file system (I was running into some issues which I am trying to resolve ..). However, this run also gives us lot of information and demonstrates that even though rm -rf works, it is does not se

Re: Correct semantics in rm -rf ?

2009-08-26 Thread shailesh jain
On Wed, Aug 26, 2009 at 2:36 AM, Jim Meyering wrote: > shailesh jain wrote: > > rm -rf does following (highly simplified) > > > > > > remove_cwd_entries() { > > > >// Check if dirp is empty ... > > readdir(); > > } > > > > remove_dir() { > > while(1) { > > > > remove_cwd_entries()

Re: Correct semantics in rm -rf ?

2009-08-26 Thread Jim Meyering
shailesh jain wrote: > I have attached a log file. Note I have ran this on local file system where > rm -rf works not on Network file system (I was running into some issues > which I am trying to resolve ..). However, this run also gives us lot of > information and demonstrates that even though rm

Re: Correct semantics in rm -rf ?

2009-08-26 Thread Jim Meyering
shailesh jain wrote: > On Wed, Aug 26, 2009 at 2:36 AM, Jim Meyering wrote: ... >> If you can demonstrate an actual failure, or even that rm is >> merely performing unnecessary unlinkat calls, please provide details. > > Thanks for consideration. I will describe how 'rm -rf parent' fails: > --- >

FYI, bootstrap.conf tweak

2009-08-26 Thread Jim Meyering
I had a ChangeLog file that was a dangling symlink, pointing into an unwritable directory. It took 30s longer to diagnose the failure than it should have, hence this patch. >From 847359b11d75df47a611ce9214246af7a62ac5e3 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Wed, 26 Aug 2009 18:20:55

[PATCH] tests: mkdir/selinux: avoid spurious failure on some SELinux systems

2009-08-26 Thread Jim Meyering
I noticed a failure on rawhide with selinux turned off: >From d6639ee63bc9321bc73ad453a266e45a89823a22 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Wed, 26 Aug 2009 10:06:53 +0200 Subject: [PATCH] tests: mkdir/selinux: avoid spurious failure on some SELinux systems * tests/test-lib.sh (req

Re: Linus' sha1 is much faster!

2009-08-26 Thread Pádraig Brady
Nicolas Pitre wrote: > On Sat, 15 Aug 2009, Linus Torvalds wrote: > >> (Heh. Looking at that, I probably should move the 'size' field first, >> since that would have different alignment rules, and the struct would be >> more tightly packed that way, and initialize better). > > I was about to su

Re: [PATCH] stdbuf: fix a small typo in the --help output

2009-08-26 Thread Jim Meyering
Pádraig Brady wrote: > diff --git a/src/stdbuf.c b/src/stdbuf.c ... > -If MODE is `L' then corresponding stream will be line buffered.\n\ > +If MODE is `L' the corresponding stream will be line buffered.\n\ > This option is invalid with standard input.\n"), stdout); >fputs (_("\n\ > -If MO

[PATCH] stdbuf: fix a small typo in the --help output

2009-08-26 Thread Pádraig Brady
diff --git a/src/stdbuf.c b/src/stdbuf.c index 5da9341..a3a58e5 100644 --- a/src/stdbuf.c +++ b/src/stdbuf.c @@ -108,10 +108,10 @@ Mandatory arguments to long options are mandatory for short options too.\n\ fputs (HELP_OPTION_DESCRIPTION, stdout); fputs (VERSION_OPTION_DESCRIPTION, s

Re: [RFC] cp --reflink handling of failed clones

2009-08-26 Thread Pádraig Brady
Jim Meyering wrote: > Pádraig Brady wrote: >> Should `cp --reflink` unlink() files if the clone fails >> rather than leaving zero length files around? > > The only argument I can come up with is "be consistent with POSIX cp", > which would leave the empty file. > > However, I don't feel strongly

Re: [RFC] cp --reflink handling of failed clones

2009-08-26 Thread Jim Meyering
Pádraig Brady wrote: > Should `cp --reflink` unlink() files if the clone fails > rather than leaving zero length files around? The only argument I can come up with is "be consistent with POSIX cp", which would leave the empty file. However, I don't feel strongly about it, so if you have a good re

[RFC] cp --reflink handling of failed clones

2009-08-26 Thread Pádraig Brady
Should `cp --reflink` unlink() files if the clone fails rather than leaving zero length files around? cheers, Pádraig.

Re: [PATCH] cp --reflink: preserve attributes on the cloned file if asked

2009-08-26 Thread Pádraig Brady
Jim Meyering wrote: > Pádraig Brady wrote: >> I think we need to preserve meta data also for cloned files, >> as in the attached patch? The patch is mostly indentation changes >> and I've copied the only interesting bit below. > > Good point! > At first glance, the patch looks ok, but it'd be even

Re: [PATCH] cp: add --reflink=auto option to fall back to standard copy

2009-08-26 Thread Jim Meyering
Pádraig Brady wrote: > Pádraig Brady wrote: >> Attached is a patch to add a new parameter to the --reflink option, >> which will perform a standard copy if COW is not supported. > > I wonder should we allow --sparse={never,always} with --reflink=auto > as a standard copy could be done in this case?

Re: [PATCH] cp: add --reflink=auto option to fall back to standard copy

2009-08-26 Thread Pádraig Brady
Pádraig Brady wrote: > Attached is a patch to add a new parameter to the --reflink option, > which will perform a standard copy if COW is not supported. I wonder should we allow --sparse={never,always} with --reflink=auto as a standard copy could be done in this case? I.E. one could envisage doing

Re: [PATCH] cp --reflink: preserve attributes on the cloned file if asked

2009-08-26 Thread Jim Meyering
Pádraig Brady wrote: > I think we need to preserve meta data also for cloned files, > as in the attached patch? The patch is mostly indentation changes > and I've copied the only interesting bit below. Good point! At first glance, the patch looks ok, but it'd be even better if it included a test t

Re: [PATCH] cp: add --reflink=auto option to fall back to standard copy

2009-08-26 Thread Jim Meyering
Pádraig Brady wrote: > Attached is a patch to add a new parameter to the --reflink option, > which will perform a standard copy if COW is not supported. > > comments appreciated. > cheers, > Pádraig. >>From b1ef11949b95446e6df08ce128d38554715e500b Mon Sep 17 00:00:00 2001 > From: =?utf-8?q?P=C3=A1d

[PATCH] cp --reflink: preserve attributes on the cloned file if asked

2009-08-26 Thread Pádraig Brady
I think we need to preserve meta data also for cloned files, as in the attached patch? The patch is mostly indentation changes and I've copied the only interesting bit below. cheers, Pádraig. diff --git a/NEWS b/NEWS index c125b31..8b0fdd5 100644 --- a/NEWS +++ b/NEWS @@ -8,6 +8,7 @@ GNU coreutil