diff options
Diffstat (limited to 'xlators/storage/posix/src/posix-handle.h')
| -rw-r--r-- | xlators/storage/posix/src/posix-handle.h | 46 |
1 files changed, 19 insertions, 27 deletions
diff --git a/xlators/storage/posix/src/posix-handle.h b/xlators/storage/posix/src/posix-handle.h index a8fd9228a..f1163b727 100644 --- a/xlators/storage/posix/src/posix-handle.h +++ b/xlators/storage/posix/src/posix-handle.h @@ -1,22 +1,12 @@ /* - Copyright (c) 2011 Gluster, Inc. <http://www.gluster.com> + Copyright (c) 2011-2012 Red Hat, Inc. <http://www.redhat.com> This file is part of GlusterFS. - GlusterFS is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, - or (at your option) any later version. - - GlusterFS is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see - <http://www.gnu.org/licenses/>. + This file is licensed to you under your choice of the GNU Lesser + General Public License, version 3 or any later version (LGPLv3 or + later), or the GNU General Public License, version 2 (GPLv2), in all + cases as published by the Free Software Foundation. */ - #ifndef _POSIX_HANDLE_H #define _POSIX_HANDLE_H @@ -74,6 +64,11 @@ "null gfid for path %s", loc->path); \ break; \ } \ + if (LOC_HAS_ABSPATH (loc)) { \ + MAKE_REAL_PATH (rpath, this, loc->path); \ + op_ret = posix_pstat (this, loc->gfid, rpath, iatt_p); \ + break; \ + } \ errno = 0; \ op_ret = posix_istat (this, loc->gfid, NULL, iatt_p); \ if (errno != ELOOP) { \ @@ -81,11 +76,6 @@ break; \ } \ /* __ret == -1 && errno == ELOOP */ \ - if (LOC_HAS_ABSPATH (loc)) { \ - MAKE_REAL_PATH (rpath, this, loc->path); \ - op_ret = posix_pstat (this, loc->gfid, rpath, iatt_p); \ - break; \ - } \ } while (0) @@ -98,6 +88,13 @@ break; \ } \ \ + if (LOC_HAS_ABSPATH (loc)) { \ + MAKE_REAL_PATH (entp, this, loc->path); \ + __parp = strdupa (entp); \ + parp = dirname (__parp); \ + op_ret = posix_pstat (this, NULL, entp, ent_p); \ + break; \ + } \ errno = 0; \ op_ret = posix_istat (this, loc->pargfid, loc->name, ent_p); \ if (errno != ELOOP) { \ @@ -106,13 +103,6 @@ break; \ } \ /* __ret == -1 && errno == ELOOP */ \ - if (LOC_HAS_ABSPATH (loc)) { \ - MAKE_REAL_PATH (entp, this, loc->path); \ - __parp = strdupa (entp); \ - parp = dirname (__parp); \ - op_ret = posix_pstat (this, NULL, entp, ent_p); \ - break; \ - } \ /* expand ELOOP */ \ } while (0) @@ -148,4 +138,6 @@ int posix_handle_init (xlator_t *this); int posix_create_link_if_gfid_exists (xlator_t *this, uuid_t gfid, char *real_path); +int +posix_handle_trash_init (xlator_t *this); #endif /* !_POSIX_HANDLE_H */ |
