Project

General

Profile

Actions

Cleanup #1135

closed

d_type cleanup

Added by Anonymous almost 13 years ago. Updated almost 13 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
-
Target version:
-
% 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 #1

Updated by Sage Weil almost 13 years ago

  • Assignee set to Sage Weil
Actions #2

Updated by Sage Weil almost 13 years ago

  • Status changed from New to Resolved
Actions

Also available in: Atom PDF