fat: introduce a helper fat_get_blknr_offset()
[deliverable/linux.git] / fs / fat / fat.h
index f16948ed5bf84468cc8e61897a65ea73922d9231..980c0346c168c60e7771f3848cd373d98dc85b87 100644 (file)
@@ -218,6 +218,13 @@ static inline sector_t fat_clus_to_blknr(struct msdos_sb_info *sbi, int clus)
                + sbi->data_start;
 }
 
+static inline void fat_get_blknr_offset(struct msdos_sb_info *sbi,
+                               loff_t i_pos, sector_t *blknr, int *offset)
+{
+       *blknr = i_pos >> sbi->dir_per_block_bits;
+       *offset = i_pos & (sbi->dir_per_block - 1);
+}
+
 static inline loff_t fat_i_pos_read(struct msdos_sb_info *sbi,
                                        struct inode *inode)
 {
This page took 0.026334 seconds and 5 git commands to generate.