Actions
Cleanup #1135
closedd_type cleanup
% Done:
0%
Tags:
Backport:
Reviewed:
Affected Versions:
Pull request ID:
Description
the codebase seems to have lots of this going on:
src/mds/CDir.cc:726: if (dn->get_linkage()->get_remote_d_type() == (S_IFDIR >> 12))
the >>12 (and <<12 in some places) seems a bit too magic and brittle.
Either use DT_DIR etc, like the example in getdents(2) shows, or DTTOIF/IFTODT like glibc docs say: http://www.delorie.com/gnu/docs/glibc/libc_270.html
(This came up when we realized xfs doesn't fill ->d_type)
Actions