Re: [RFC PATCH] client: don't use special inode for /..

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

 



On Wed, Aug 10, 2016 at 12:30 PM, Jeff Layton <jlayton@xxxxxxxxxx> wrote:
> The CEPH_INO_DOTDOT thing is quite strange. Under most OS (Linux
> included), the parent of the root is itself. IOW, at the root, '.' and
> '..' refer to the same inode.
>
> Change the ceph client to do the same, as this allows users to get
> valid stat info for '..', as well as elimnating some special-casing.
>
> Signed-off-by: Jeff Layton <jlayton@xxxxxxxxxx>

Don't forget Client::_lookup:

  if (dname == "..") {
    if (dir->dn_set.empty())
      r = -ENOENT;
    else
      *target = dir->get_first_parent()->dir->parent_inode; //dirs
can't be hard-linked
    goto done;
  }

Otherwise LGTM.

-- 
Patrick Donnelly
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux