Lines Matching refs:block

313  * Extract the bits for a block from a map inside ufs_buffer_head
458 #define ubh_isblockclear(ubh,begin,block) (!_ubh_isblockset_(uspi,ubh,begin,block))
460 #define ubh_isblockset(ubh,begin,block) _ubh_isblockset_(uspi,ubh,begin,block)
462 struct ufs_buffer_head * ubh, unsigned begin, unsigned block)
467 return (*ubh_get_addr (ubh, begin + block) == 0xff);
469 mask = 0x0f << ((block & 0x01) << 2);
470 return (*ubh_get_addr (ubh, begin + (block >> 1)) & mask) == mask;
472 mask = 0x03 << ((block & 0x03) << 1);
473 return (*ubh_get_addr (ubh, begin + (block >> 2)) & mask) == mask;
475 mask = 0x01 << (block & 0x07);
476 return (*ubh_get_addr (ubh, begin + (block >> 3)) & mask) == mask;
481 #define ubh_clrblock(ubh,begin,block) _ubh_clrblock_(uspi,ubh,begin,block)
483 struct ufs_buffer_head * ubh, unsigned begin, unsigned block)
487 *ubh_get_addr (ubh, begin + block) = 0x00;
490 *ubh_get_addr (ubh, begin + (block >> 1)) &= ~(0x0f << ((block & 0x01) << 2));
493 *ubh_get_addr (ubh, begin + (block >> 2)) &= ~(0x03 << ((block & 0x03) << 1));
496 *ubh_get_addr (ubh, begin + (block >> 3)) &= ~(0x01 << ((block & 0x07)));
501 #define ubh_setblock(ubh,begin,block) _ubh_setblock_(uspi,ubh,begin,block)
503 struct ufs_buffer_head * ubh, unsigned begin, unsigned block)
507 *ubh_get_addr(ubh, begin + block) = 0xff;
510 *ubh_get_addr(ubh, begin + (block >> 1)) |= (0x0f << ((block & 0x01) << 2));
513 *ubh_get_addr(ubh, begin + (block >> 2)) |= (0x03 << ((block & 0x03) << 1));
516 *ubh_get_addr(ubh, begin + (block >> 3)) |= (0x01 << ((block & 0x07)));