[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: rm && opensolaris && ntfs-3g problem

From: Jim Meyering
Subject: Re: rm && opensolaris && ntfs-3g problem
Date: Thu, 14 Aug 2008 14:07:32 +0200

"Andras Barna" <address@hidden> wrote:
> On Wed, Aug 13, 2008 at 9:39 PM, Jim Meyering <address@hidden> wrote:
>> "Andras Barna" <address@hidden> wrote:
>>> On Tue, Aug 12, 2008 at 6:56 PM, Jim Meyering <address@hidden> wrote:
>> ...
>>>> That suggests that the opensolaris ntfs support for unlinkat
>>>> doesn't work as documented.  That unlinkat call is succeeding,
>>>> yet I presume there is a non-empty directory named "l" that it
>>>> fails to remove.
>>>> There are two differences in how unlinkat is used between
>>>> coreutils and /usr/bin/rm:
>>>>  - coreutils uses "0" as the third argument, and /bin/rm uses 0x1
>>>>    (which is probably AT_REMOVEDIR)
>>>>  - coreutils uses AT_FDCWD as the first argument, and /bin/rm
>>>>    uses a file descriptor.
>>>> Since Solaris is where openat-style functions originated, I'm
>>>> surprised that their ntfs implementation would not adhere to the
>>>> documented specification.
>>> what you mean under "their ntfs implementation"?
>>> i thought we talk about ntfs-3g
>>> hint: http://ntfs-3g.org/
>> Sorry for the imprecision.
>> Obviously, I meant "the ntfs-3g" driver code, since
>> this seems to be ntfs-3g specific.  It'd be good to know
>> if it is also specific to Solaris, and what precise version(s)
>> of ntfs-3g are affected, if only to document the problem
>> for people who encounter this in the future.
>> For the record, can you tell us what versions you know to be affected?
> it's the latest ntfs-3g
> ok, let's say that ntfs-3g is buggy, these are bugs
> - different versions of GNU rm behaves different?

Those two versions of rm use different approaches,
that the newer 6.12 would trigger a bug while the older
one does not is not surprising.

> - returns 0 but it not succeed

The unlinkat syscall it at fault.  Your truss output shows that unlinkat
returns 0 even though it appears not to remove the named directory.
GNU rm merely propagates that success to its exit status.

> - again with rm 6.7 i can rm directories with -r but -rf

Since afaik, this happens only with ntfs-3g, and there is
such an egregious syscall failure exposed by coreutils-6.12,
I haven't investigated.

>>>> I do not plan to make GNU rm work around this bug.
>>> sorry for reporting it
>> What I should have said is that working around this
>> system-and-file-system-specific bug in coreutils/gnulib would not be easy,
>> and would probably have a negative impact all other systems.  However,
>> if someone can come up with a patch that is low-impact and safe looking,
>> I'll be happy to look at it.
>> I'm hoping we can ignore it, i.e., because the bug is only
>> in versions that few will use.
> really?
> again: coreutils is integrated to opensolaris
> see:http://opensolaris.org/os/community/arc/caselog/2007/048/
> and GNU coreutils are used on other NON linux OS too, *bsd etc.
> i thought that gnu is not limited to linux

It is not, of course.
And if you can show that coreutils is at fault,
it'll surely be fixed promptly.

So far, the evidence suggests that this is not a bug in coreutils

reply via email to

[Prev in Thread] Current Thread [Next in Thread]