]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.git/commit
ceph: fix up the types of the file layout helpers historic/wip-layout-helpers
authorAlex Elder <elder@dreamhost.com>
Thu, 8 Mar 2012 22:51:28 +0000 (16:51 -0600)
committerAlex Elder <elder@dreamhost.com>
Mon, 9 Apr 2012 15:15:16 +0000 (10:15 -0500)
commit0c2e9f7bd1500d46a3e4a762270d43e46a4ca1f5
tree57e65e24e91eed033ad7a65177aafdee6895847e
parentc2bc79c00094cb7e2798bb9678d79e9634cdc663
ceph: fix up the types of the file layout helpers

The helper macros for accessing file layout fields of an on-disk
ceph file layout structure cast their results to type (__s32).  This
is a bit strange, since (with one exception--fl_pg_preferred):
    - there is no need for negative values; and
    - all users of these macros are assigning their result to
      64-bit variables.
So just make these macros return a 64-bit unsigned type.

The exception is the preferred placement group, which remains a
signed 32-bit value.  A placement group id encodes the preferred
primary OSD in a 16-bit value, and there's no sense at this point
getting too far away from that.

And finally, the fl_cas_hash and fl_object_stripe_unit fields are
essentially unused, but are both 32 bits and signed.  Keep their
size, but make them unsigned, since neither a hash nor a stripe
unit has any business having a negative value.

Signed-off-by: Alex Elder <elder@dreamhost.com>
fs/ceph/inode.c
fs/ceph/ioctl.c
fs/ceph/xattr.c
include/linux/ceph/ceph_fs.h
net/ceph/ceph_fs.c
net/ceph/osdmap.c