diff options
author | Rob Herring <robh@kernel.org> | 2014-01-17 16:01:27 -0600 |
---|---|---|
committer | Rob Herring <robh@kernel.org> | 2014-01-17 16:01:27 -0600 |
commit | 361128fcbf30f590a05c8e8789155364f37367db (patch) | |
tree | 7f7973599e286dfd48ea724a5b7fb4bca76b294e /fs/ext4/ext4.h | |
parent | e2897d7e0b0460dca91b52d55ce41c888363502d (diff) | |
parent | 482c43419fc204b4b658fa4acb80cd502e5fcbac (diff) | |
download | linux-361128fcbf30f590a05c8e8789155364f37367db.tar.bz2 |
Merge remote-tracking branch 'grant/devicetree/next' into for-3.14
Diffstat (limited to 'fs/ext4/ext4.h')
-rw-r--r-- | fs/ext4/ext4.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h index e6185031c1cc..ece55565b9cd 100644 --- a/fs/ext4/ext4.h +++ b/fs/ext4/ext4.h @@ -268,6 +268,16 @@ struct ext4_io_submit { /* Translate # of blks to # of clusters */ #define EXT4_NUM_B2C(sbi, blks) (((blks) + (sbi)->s_cluster_ratio - 1) >> \ (sbi)->s_cluster_bits) +/* Mask out the low bits to get the starting block of the cluster */ +#define EXT4_PBLK_CMASK(s, pblk) ((pblk) & \ + ~((ext4_fsblk_t) (s)->s_cluster_ratio - 1)) +#define EXT4_LBLK_CMASK(s, lblk) ((lblk) & \ + ~((ext4_lblk_t) (s)->s_cluster_ratio - 1)) +/* Get the cluster offset */ +#define EXT4_PBLK_COFF(s, pblk) ((pblk) & \ + ((ext4_fsblk_t) (s)->s_cluster_ratio - 1)) +#define EXT4_LBLK_COFF(s, lblk) ((lblk) & \ + ((ext4_lblk_t) (s)->s_cluster_ratio - 1)) /* * Structure of a blocks group descriptor |