All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Staubach <staubach@redhat.com>
To: "Lever, Charles" <Charles.Lever@netapp.com>
Cc: nfs@lists.sourceforge.net
Subject: Re: historical question: nfs_rename()
Date: Mon, 17 Oct 2005 15:18:56 -0400	[thread overview]
Message-ID: <4353F920.4070408@redhat.com> (raw)
In-Reply-To: <044B81DE141D7443BCE91E8F44B3C1E288E56A@exsvl02.hq.netapp.com>

Lever, Charles wrote:

>a customer recently pointed out that the rename(2) system call does not
>allow replacing directories, even if they are empty.  RFC1813 at least
>suggests that the server and protocol do allow directory replacement, as
>long as the target is empty.
>
>the culprit appears to be this check in nfs_rename()
>
>        if (S_ISDIR(new_inode->i_mode))
>                goto out;
>
>which causes nfs_rename() to return -EBUSY if the target is a directory.
>
>is there a historical reason why the Linux NFS client does not allow
>directory replacement?  shouldn't the error code be -EISDIR for this
>case?
>

Assuming that the client can handle this situation by ensuring that all
of its caches stay updated, then it seems to me that the client should
just package up the rename and send it off to the server.  It should be
up to the server to decide whether it can handle directory renames of
this type or not.

    Thanx...

       ps


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

  reply	other threads:[~2005-10-17 19:19 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-17 19:12 historical question: nfs_rename() Lever, Charles
2005-10-17 19:18 ` Peter Staubach [this message]
2005-10-18 16:10 ` Trond Myklebust
2005-10-18 16:57   ` Peter Staubach
2005-10-18 18:06     ` Trond Myklebust
  -- strict thread matches above, loose matches on Subject: below --
2005-10-18 17:59 Lever, Charles
2005-10-18 18:03 ` Peter Staubach
2005-10-18 18:11 ` Trond Myklebust
2005-10-18 18:15 Lever, Charles
2005-10-18 18:36 ` Trond Myklebust

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=4353F920.4070408@redhat.com \
    --to=staubach@redhat.com \
    --cc=Charles.Lever@netapp.com \
    --cc=nfs@lists.sourceforge.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.