version 1.56.4.2, 2013/01/23 00:06:33 |
version 1.57, 2012/04/19 17:25:38 |
|
|
* Determining the size of a file block in the file system. |
* Determining the size of a file block in the file system. |
*/ |
*/ |
#define blksize(fs, ip, lbn) \ |
#define blksize(fs, ip, lbn) \ |
(((lbn) >= UFS_NDADDR || (ip)->i_size >= lblktosize(fs, (lbn) + 1)) \ |
(((lbn) >= NDADDR || (ip)->i_size >= lblktosize(fs, (lbn) + 1)) \ |
? (fs)->fs_bsize \ |
? (uint64_t)(fs)->fs_bsize \ |
: ((int32_t)fragroundup(fs, blkoff(fs, (ip)->i_size)))) |
: (fragroundup(fs, blkoff(fs, (ip)->i_size)))) |
|
|
#define sblksize(fs, size, lbn) \ |
#define sblksize(fs, size, lbn) \ |
(((lbn) >= UFS_NDADDR || (size) >= ((lbn) + 1) << (fs)->fs_bshift) \ |
(((lbn) >= NDADDR || (size) >= ((lbn) + 1) << (fs)->fs_bshift) \ |
? (fs)->fs_bsize \ |
? (uint64_t)(fs)->fs_bsize \ |
: ((int32_t)fragroundup(fs, blkoff(fs, (uint64_t)(size))))) |
: (fragroundup(fs, blkoff(fs, (size))))) |
|
|
|
|
/* |
/* |