[Bugs] [Bug 1332396] posix: Set correct d_type for readdirp() calls
bugzilla at redhat.com
bugzilla at redhat.com
Tue May 3 06:35:06 UTC 2016
https://bugzilla.redhat.com/show_bug.cgi?id=1332396
--- Comment #2 from Vijay Bellur <vbellur at redhat.com> ---
COMMIT: http://review.gluster.org/14175 committed in release-3.8 by Niels de
Vos (ndevos at redhat.com)
------
commit fff596880afe0e06b433fd3afbe1a2335bf88709
Author: Prashanth Pai <ppai at redhat.com>
Date: Wed Apr 27 13:37:07 2016 +0530
posix: Set correct d_type for readdirp() calls
dirent.d_type can contain the type of the directory entry. The 'd_type'
struct member in dirent is present in Linux and many BSD flavours.
However, filling d_type with correct value requires support from the
underlying filesystem. If not, d_type is set to DT_UNKNOWN. XFS added
support for d_type as part of their newer version 5 on-disk format.
However, this requires Linux >= 3.15, xfsprogs >= 3.2.0 and the bricks
to be formatted using the new format.
This patch enables posix xlator to set d_type to the right value even
when the underlying filesystem does not support it. d_type can be set
using information previously fetched by stat() on the dir entry.
This will aid FUSE applications to leverage d_type to avoid the expense
of calling lstat() if further actions depend on the type of the file.
Refer `man 3 readdir` and `man 2 getdents`
> Change-Id: Ic5a262fe4c64122726b4fae2d1bea375c559ca04
> Signed-off-by: Prashanth Pai <ppai at redhat.com>
> Reviewed-on: http://review.gluster.org/14095
> Smoke: Gluster Build System <jenkins at build.gluster.com>
> NetBSD-regression: NetBSD Build System <jenkins at build.gluster.org>
> CentOS-regression: Gluster Build System <jenkins at build.gluster.com>
> Reviewed-by: Jeff Darcy <jdarcy at redhat.com>
(cherry picked from commit 77def44d497d090ef3f393b6d9403c1a29dcf993)
Change-Id: Iaaf2a7c85ce8deb9043772e04a76b904d8bf076e
BUG: 1332396
Signed-off-by: Prashanth Pai <ppai at redhat.com>
Reviewed-on: http://review.gluster.org/14175
Smoke: Gluster Build System <jenkins at build.gluster.com>
NetBSD-regression: NetBSD Build System <jenkins at build.gluster.org>
Reviewed-by: Niels de Vos <ndevos at redhat.com>
CentOS-regression: Gluster Build System <jenkins at build.gluster.com>
--
You are receiving this mail because:
You are on the CC list for the bug.
Unsubscribe from this bug https://bugzilla.redhat.com/token.cgi?t=X31aQWG5ib&a=cc_unsubscribe
More information about the Bugs
mailing list