Source-Changes-HG archive

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

[src/trunk]: src/lib/libperfuse When lookup returns a node with null inode nu...



details:   https://anonhg.NetBSD.org/src/rev/b2991815dbe4
branches:  trunk
changeset: 782464:b2991815dbe4
user:      manu <manu%NetBSD.org@localhost>
date:      Sat Nov 03 15:43:20 2012 +0000

description:
When lookup returns a node with null inode number, it means the ENOENT,
with negative caching. We do not implement negative caching yet, but
we honour the ENOENT.

diffstat:

 lib/libperfuse/ops.c |  12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diffs (26 lines):

diff -r ebb21ef406ee -r b2991815dbe4 lib/libperfuse/ops.c
--- a/lib/libperfuse/ops.c      Sat Nov 03 15:40:58 2012 +0000
+++ b/lib/libperfuse/ops.c      Sat Nov 03 15:43:20 2012 +0000
@@ -1,4 +1,4 @@
-/*  $NetBSD: ops.c,v 1.59 2012/07/21 05:49:42 manu Exp $ */
+/*  $NetBSD: ops.c,v 1.60 2012/11/03 15:43:20 manu Exp $ */
 
 /*-
  *  Copyright (c) 2010-2011 Emmanuel Dreyfus. All rights reserved.
@@ -433,6 +433,16 @@
 
        feo = GET_OUTPAYLOAD(ps, pm, fuse_entry_out);
 
+       /* 
+        * Starting with ABI 7.4, inode number 0 means ENOENT, 
+        * with entry_valid / entry_valid_nsec giving negative
+        * cache timeout (which we do not implement yet).
+        */
+       if (feo->attr.ino == 0) {
+               ps->ps_destroy_msg(pm);
+               return ENOENT;
+       }
+
        /*
         * Check for a known node, not reclaimed, with another name.
         * It may have been moved, or we can lookup ../



Home | Main Index | Thread Index | Old Index