linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC] st_nlink after rmdir() and rename()
Date: Fri, 04 Mar 2011 08:14:55 +0900	[thread overview]
Message-ID: <87d3m794pc.fsf@devron.myhome.or.jp> (raw)
In-Reply-To: <AANLkTintTRHmAfvBwFszNyqbssbX91k17u=0kh+V7N7D@mail.gmail.com> (Linus Torvalds's message of "Thu, 3 Mar 2011 14:37:36 -0800")

Linus Torvalds <torvalds@linux-foundation.org> writes:

> On Thu, Mar 3, 2011 at 2:26 PM, OGAWA Hirofumi
> <hirofumi@mail.parknet.co.jp> wrote:
>>
>> I don't know much about NFS though, I imaged the NFS just fill the
>> stat.st_nlink to return to userland by 0 if sillyrenamed dentry? (of
>> course, I'm not saying let's emulate "i_nlink >= 1" on all
>> filesystems. just about i_nlink == 0) I was thinking Al is working for
>> it...
>
> So even if we did that, WHAT WOULD BE THE UPSIDE?
>
> Code that cares wouldn't run on any other Unix, or on any older
> version of Linux.
>
> And I claim that there is not a single reason to do it anyway. That
> whole "code that cares" is totally theoretical. Such code simply
> doesn't exist.
>
> If you just opened a directory, and then did a "rmdir()" on that
> directory, then you're just a f*cking moron if you go around saying
> "ok, let me now do an fstat() on that fd to see if it really got
> deleted or not". That's just _stupid_.
>
> Really. There is absolutely no point in introducing a new rule that
> nobody cares about, that we haven't followed ourselves historically,
> and that would require us to play insane hacky games.
>
> WHY DO IT? WHY CARE? WHY, WHY, WHY?

The reason is simple, I'm not sure it is true or not though. Because the
undefined behavior makes the unfixable bug or hard to fix bug (just
because of backward compatibiliy reason). In my experience, I was
bothered many times with that, and why I want to make define state
(well, now I think we define as "we don't care it". that's fine). I hate
it and it is why from me.

Thanks.
-- 
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>

  reply	other threads:[~2011-03-03 23:14 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-03  3:24 [RFC] st_nlink after rmdir() and rename() Al Viro
2011-03-03  4:42 ` Al Viro
2011-03-03  5:17 ` Linus Torvalds
2011-03-03  6:03   ` Al Viro
2011-03-03 20:05     ` Linus Torvalds
2011-03-03 20:46       ` OGAWA Hirofumi
2011-03-03 20:50         ` OGAWA Hirofumi
2011-03-03 21:02         ` Linus Torvalds
2011-03-03 21:30           ` Al Viro
2011-03-03 21:37           ` OGAWA Hirofumi
2011-03-03 21:52             ` Linus Torvalds
2011-03-03 22:26               ` OGAWA Hirofumi
2011-03-03 22:37                 ` Linus Torvalds
2011-03-03 23:14                   ` OGAWA Hirofumi [this message]
2011-03-03 23:12                 ` Al Viro
2011-03-03 22:57               ` Al Viro
2011-03-03 23:07                 ` Al Viro
2011-03-04  6:55                 ` omfs fixes Al Viro
2011-03-04 15:24                   ` Bob Copeland
2011-03-03 21:23       ` [RFC] st_nlink after rmdir() and rename() Al Viro
2011-03-03 14:34 ` Theodore Tso
2011-03-03 16:17   ` Andreas Schwab
2011-03-03 19:16   ` Al Viro

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87d3m794pc.fsf@devron.myhome.or.jp \
    --to=hirofumi@mail.parknet.co.jp \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).