diff options
author | Alex Elder <elder@inktank.com> | 2012-07-13 21:35:11 -0400 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2012-07-30 21:15:47 -0400 |
commit | aa711ee3402ad10ffd5b70ce0417fadc9a95cccf (patch) | |
tree | 2400f84b9bc87fbd989844c4e2462809f69e9a96 /include/linux/ceph | |
parent | bd919d45aa61c19d9ed82548d6deb06bcae31153 (diff) |
ceph: define snap counts as u32 everywhere
There are two structures in which a count of snapshots are
maintained:
struct ceph_snap_context {
...
u32 num_snaps;
...
}
and
struct ceph_snap_realm {
...
u32 num_prior_parent_snaps; /* had prior to parent_since */
...
u32 num_snaps;
...
}
These fields never take on negative values (e.g., to hold special
meaning), and so are really inherently unsigned. Furthermore they
take their value from over-the-wire or on-disk formatted 32-bit
values.
So change their definition to have type u32, and change some spots
elsewhere in the code to account for this change.
Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Diffstat (limited to 'include/linux/ceph')
-rw-r--r-- | include/linux/ceph/libceph.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/ceph/libceph.h b/include/linux/ceph/libceph.h index ea072e1f9db9..42624789b06f 100644 --- a/include/linux/ceph/libceph.h +++ b/include/linux/ceph/libceph.h | |||
@@ -154,7 +154,7 @@ struct ceph_client { | |||
154 | struct ceph_snap_context { | 154 | struct ceph_snap_context { |
155 | atomic_t nref; | 155 | atomic_t nref; |
156 | u64 seq; | 156 | u64 seq; |
157 | int num_snaps; | 157 | u32 num_snaps; |
158 | u64 snaps[]; | 158 | u64 snaps[]; |
159 | }; | 159 | }; |
160 | 160 | ||