Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1548126

Re: [PATCH 3/6] ubifs: Use 64bit readdir cookies

From Richard Weinberger <richard@nod.at>
Newsgroups linux.kernel
Subject Re: [PATCH 3/6] ubifs: Use 64bit readdir cookies
Date 2016-12-29 17:00 +0100
Message-ID <sTLhv-8sX-9@gated-at.bofh.it> (permalink)
References <sJHId-2WG-11@gated-at.bofh.it> <sJHId-2WG-9@gated-at.bofh.it> <sTz6G-yi-13@gated-at.bofh.it> <sTF2q-4HK-17@gated-at.bofh.it> <sTKYa-8mm-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Bruce,

On 29.12.2016 16:34, J. Bruce Fields wrote:
>> That way UBIFS can provide a 64bit readdir() cookie which is required for NFS3.
> 
> Sounds good.  And if a matching entry isn't found (as in the case of a
> concurrent unlink), what happens?  The answer must be the same as for
> ext4, but I've forgotten the details....  I guess it must find the next
> highest cookie (thinking of the cookie as a 64-bit integer of some kind)
> that exists in the directory.  And that must be the same order that
> readdir normally returns entries in.

If a 64bit cookie is not found, the lookup function returns -ENOENT.
In UBIFS we cannot just select a higher or lower key (cookie in this case),
since it is the B-tree key and would point to a completely different
entry.

So, in case of a concurrent unlink() one would succeed and one fail with
-ENOENT. Unless I miss something that seems okay to me.

Thanks,
//richard

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH 3/6] ubifs: Use 64bit readdir cookies bfields@fieldses.org (J. Bruce Fields) - 2016-12-29 04:00 +0100
  Re: [PATCH 3/6] ubifs: Use 64bit readdir cookies "J. Bruce Fields" <bfields@fieldses.org> - 2016-12-29 16:40 +0100
    Re: [PATCH 3/6] ubifs: Use 64bit readdir cookies Richard Weinberger <richard@nod.at> - 2016-12-29 17:00 +0100
      Re: [PATCH 3/6] ubifs: Use 64bit readdir cookies Richard Weinberger <richard@nod.at> - 2016-12-29 17:40 +0100
        Re: [PATCH 3/6] ubifs: Use 64bit readdir cookies "J. Bruce Fields" <bfields@fieldses.org> - 2016-12-29 18:00 +0100
          Re: [PATCH 3/6] ubifs: Use 64bit readdir cookies Richard Weinberger <richard@nod.at> - 2016-12-29 18:20 +0100
      Re: [PATCH 3/6] ubifs: Use 64bit readdir cookies "J. Bruce Fields" <bfields@fieldses.org> - 2016-12-29 17:50 +0100
  Re: [PATCH 3/6] ubifs: Use 64bit readdir cookies Richard Weinberger <richard@nod.at> - 2016-12-29 10:20 +0100

csiph-web