• Home
  • Raw
  • Download

Lines Matching refs:uspi

266 #define ubh_bread(sb,fragment,size) _ubh_bread_(uspi,sb,fragment,size)  
276 #define ubh_ubhcpymem(mem,ubh,size) _ubh_ubhcpymem_(uspi,mem,ubh,size)
278 #define ubh_memcpyubh(ubh,mem,size) _ubh_memcpyubh_(uspi,ubh,mem,size)
295 static inline void *get_usb_offset(struct ufs_sb_private_info *uspi, in get_usb_offset() argument
300 index = offset >> uspi->s_fshift; in get_usb_offset()
301 offset &= ~uspi->s_fmask; in get_usb_offset()
302 return uspi->s_ubh.bh[index]->b_data + offset; in get_usb_offset()
305 #define ubh_get_usb_first(uspi) \ argument
306 ((struct ufs_super_block_first *)get_usb_offset((uspi), 0))
308 #define ubh_get_usb_second(uspi) \ argument
309 ((struct ufs_super_block_second *)get_usb_offset((uspi), UFS_SECTOR_SIZE))
311 #define ubh_get_usb_third(uspi) \ argument
312 ((struct ufs_super_block_third *)get_usb_offset((uspi), 2*UFS_SECTOR_SIZE))
324 ((u8*)(ubh)->bh[(begin) >> uspi->s_fshift]->b_data + \
325 ((begin) & ~uspi->s_fmask))
328 (((__fs16*)((ubh)->bh[(begin) >> (uspi->s_fshift-1)]->b_data)) + \
329 ((begin) & ((uspi->fsize>>1) - 1)))
332 (((__fs32*)((ubh)->bh[(begin) >> (uspi->s_fshift-2)]->b_data)) + \
333 ((begin) & ((uspi->s_fsize>>2) - 1)))
336 (((__fs64*)((ubh)->bh[(begin) >> (uspi->s_fshift-3)]->b_data)) + \
337 ((begin) & ((uspi->s_fsize>>3) - 1)))
341 static inline void *ubh_get_data_ptr(struct ufs_sb_private_info *uspi, in ubh_get_data_ptr() argument
345 if (uspi->fs_magic == UFS2_MAGIC) in ubh_get_data_ptr()
352 …((*ubh_get_addr(ubh, (begin) + ((bit) >> 3)) >> ((bit) & 7)) & (0xff >> (UFS_MAXFRAG - uspi->s_fpb…
355 ufs_freefrags(struct ufs_sb_private_info *uspi) in ufs_freefrags() argument
357 return ufs_blkstofrags(uspi->cs_total.cs_nbfree) + in ufs_freefrags()
358 uspi->cs_total.cs_nffree; in ufs_freefrags()
369 (ucpi)->c_boff + (((cylno) * uspi->s_nrpos + (rpos)) << 1 ))))
390 #define ubh_find_first_zero_bit(ubh,begin,size) _ubh_find_next_zero_bit_(uspi,ubh,begin,size,0)
392 #define ubh_find_next_zero_bit(ubh,begin,size,offset) _ubh_find_next_zero_bit_(uspi,ubh,begin,size,…
394 struct ufs_sb_private_info * uspi, struct ufs_buffer_head * ubh, in _ubh_find_next_zero_bit_() argument
402 base = offset >> uspi->s_bpfshift; in _ubh_find_next_zero_bit_()
403 offset &= uspi->s_bpfmask; in _ubh_find_next_zero_bit_()
405 count = min_t(unsigned int, size + offset, uspi->s_bpf); in _ubh_find_next_zero_bit_()
413 return (base << uspi->s_bpfshift) + pos - begin; in _ubh_find_next_zero_bit_()
439 #define ubh_find_last_zero_bit(ubh,begin,size,offset) _ubh_find_last_zero_bit_(uspi,ubh,begin,size,…
441 struct ufs_sb_private_info * uspi, struct ufs_buffer_head * ubh, in _ubh_find_last_zero_bit_() argument
449 base = start >> uspi->s_bpfshift; in _ubh_find_last_zero_bit_()
450 start &= uspi->s_bpfmask; in _ubh_find_last_zero_bit_()
453 size + (uspi->s_bpf - start), uspi->s_bpf) in _ubh_find_last_zero_bit_()
454 - (uspi->s_bpf - start); in _ubh_find_last_zero_bit_()
461 start = uspi->s_bpf; in _ubh_find_last_zero_bit_()
463 return (base << uspi->s_bpfshift) + pos - begin; in _ubh_find_last_zero_bit_()
466 #define ubh_isblockclear(ubh,begin,block) (!_ubh_isblockset_(uspi,ubh,begin,block))
468 #define ubh_isblockset(ubh,begin,block) _ubh_isblockset_(uspi,ubh,begin,block)
469 static inline int _ubh_isblockset_(struct ufs_sb_private_info * uspi, in _ubh_isblockset_() argument
473 switch (uspi->s_fpb) { in _ubh_isblockset_()
489 #define ubh_clrblock(ubh,begin,block) _ubh_clrblock_(uspi,ubh,begin,block)
490 static inline void _ubh_clrblock_(struct ufs_sb_private_info * uspi, in _ubh_clrblock_() argument
493 switch (uspi->s_fpb) { in _ubh_clrblock_()
509 #define ubh_setblock(ubh,begin,block) _ubh_setblock_(uspi,ubh,begin,block)
510 static inline void _ubh_setblock_(struct ufs_sb_private_info * uspi, in _ubh_setblock_() argument
513 switch (uspi->s_fpb) { in _ubh_setblock_()
532 struct ufs_sb_private_info * uspi; in ufs_fragacct() local
535 uspi = UFS_SB(sb)->s_uspi; in ufs_fragacct()
538 for (pos = 0; pos < uspi->s_fpb; pos++) { in ufs_fragacct()
547 if (fragsize > 0 && fragsize < uspi->s_fpb) in ufs_fragacct()
551 static inline void *ufs_get_direct_data_ptr(struct ufs_sb_private_info *uspi, in ufs_get_direct_data_ptr() argument
556 return uspi->fs_magic == UFS2_MAGIC ? in ufs_get_direct_data_ptr()
576 static inline void ufs_data_ptr_clear(struct ufs_sb_private_info *uspi, in ufs_data_ptr_clear() argument
579 if (uspi->fs_magic == UFS2_MAGIC) in ufs_data_ptr_clear()
585 static inline int ufs_is_data_ptr_zero(struct ufs_sb_private_info *uspi, in ufs_is_data_ptr_zero() argument
588 if (uspi->fs_magic == UFS2_MAGIC) in ufs_is_data_ptr_zero()