/linux-4.1.27/include/uapi/linux/netfilter/ |
H A D | xt_TCPOPTSTRIP.h | 6 #define tcpoptstrip_set_bit(bmap, idx) \ 7 (bmap[(idx) >> 5] |= 1U << (idx & 31)) 8 #define tcpoptstrip_test_bit(bmap, idx) \ 9 (((1U << (idx & 31)) & bmap[(idx) >> 5]) != 0)
|
/linux-4.1.27/fs/nilfs2/ |
H A D | bmap.c | 2 * bmap.c - NILFS block mapping. 27 #include "bmap.h" 35 struct inode *nilfs_bmap_get_dat(const struct nilfs_bmap *bmap) nilfs_bmap_get_dat() argument 37 struct the_nilfs *nilfs = bmap->b_inode->i_sb->s_fs_info; nilfs_bmap_get_dat() 42 static int nilfs_bmap_convert_error(struct nilfs_bmap *bmap, nilfs_bmap_convert_error() argument 45 struct inode *inode = bmap->b_inode; nilfs_bmap_convert_error() 49 "broken bmap (inode number=%lu)\n", inode->i_ino); nilfs_bmap_convert_error() 57 * @bmap: bmap 63 * matches @key in the block at @level of the bmap. 75 int nilfs_bmap_lookup_at_level(struct nilfs_bmap *bmap, __u64 key, int level, nilfs_bmap_lookup_at_level() argument 81 down_read(&bmap->b_sem); nilfs_bmap_lookup_at_level() 82 ret = bmap->b_ops->bop_lookup(bmap, key, level, ptrp); nilfs_bmap_lookup_at_level() 84 ret = nilfs_bmap_convert_error(bmap, __func__, ret); nilfs_bmap_lookup_at_level() 87 if (NILFS_BMAP_USE_VBN(bmap)) { nilfs_bmap_lookup_at_level() 88 ret = nilfs_dat_translate(nilfs_bmap_get_dat(bmap), *ptrp, nilfs_bmap_lookup_at_level() 95 up_read(&bmap->b_sem); nilfs_bmap_lookup_at_level() 99 int nilfs_bmap_lookup_contig(struct nilfs_bmap *bmap, __u64 key, __u64 *ptrp, nilfs_bmap_lookup_contig() argument 104 down_read(&bmap->b_sem); nilfs_bmap_lookup_contig() 105 ret = bmap->b_ops->bop_lookup_contig(bmap, key, ptrp, maxblocks); nilfs_bmap_lookup_contig() 106 up_read(&bmap->b_sem); nilfs_bmap_lookup_contig() 108 return nilfs_bmap_convert_error(bmap, __func__, ret); nilfs_bmap_lookup_contig() 111 static int nilfs_bmap_do_insert(struct nilfs_bmap *bmap, __u64 key, __u64 ptr) nilfs_bmap_do_insert() argument 117 if (bmap->b_ops->bop_check_insert != NULL) { nilfs_bmap_do_insert() 118 ret = bmap->b_ops->bop_check_insert(bmap, key); nilfs_bmap_do_insert() 120 n = bmap->b_ops->bop_gather_data( nilfs_bmap_do_insert() 121 bmap, keys, ptrs, NILFS_BMAP_SMALL_HIGH + 1); nilfs_bmap_do_insert() 125 bmap, key, ptr, keys, ptrs, n); nilfs_bmap_do_insert() 127 bmap->b_u.u_flags |= NILFS_BMAP_LARGE; nilfs_bmap_do_insert() 134 return bmap->b_ops->bop_insert(bmap, key, ptr); nilfs_bmap_do_insert() 138 * nilfs_bmap_insert - insert a new key-record pair into a bmap 139 * @bmap: bmap 144 * by @key and @rec into @bmap. 155 int nilfs_bmap_insert(struct nilfs_bmap *bmap, __u64 key, unsigned long rec) nilfs_bmap_insert() argument 159 down_write(&bmap->b_sem); nilfs_bmap_insert() 160 ret = nilfs_bmap_do_insert(bmap, key, rec); nilfs_bmap_insert() 161 up_write(&bmap->b_sem); nilfs_bmap_insert() 163 return nilfs_bmap_convert_error(bmap, __func__, ret); nilfs_bmap_insert() 166 static int nilfs_bmap_do_delete(struct nilfs_bmap *bmap, __u64 key) nilfs_bmap_do_delete() argument 172 if (bmap->b_ops->bop_check_delete != NULL) { nilfs_bmap_do_delete() 173 ret = bmap->b_ops->bop_check_delete(bmap, key); nilfs_bmap_do_delete() 175 n = bmap->b_ops->bop_gather_data( nilfs_bmap_do_delete() 176 bmap, keys, ptrs, NILFS_BMAP_LARGE_LOW + 1); nilfs_bmap_do_delete() 180 bmap, key, keys, ptrs, n); nilfs_bmap_do_delete() 182 bmap->b_u.u_flags &= ~NILFS_BMAP_LARGE; nilfs_bmap_do_delete() 189 return bmap->b_ops->bop_delete(bmap, key); nilfs_bmap_do_delete() 194 * @bmap: bmap struct 198 * Description: nilfs_bmap_seek_key() seeks a valid key on @bmap 210 int nilfs_bmap_seek_key(struct nilfs_bmap *bmap, __u64 start, __u64 *keyp) nilfs_bmap_seek_key() argument 214 down_read(&bmap->b_sem); nilfs_bmap_seek_key() 215 ret = bmap->b_ops->bop_seek_key(bmap, start, keyp); nilfs_bmap_seek_key() 216 up_read(&bmap->b_sem); nilfs_bmap_seek_key() 219 ret = nilfs_bmap_convert_error(bmap, __func__, ret); nilfs_bmap_seek_key() 223 int nilfs_bmap_last_key(struct nilfs_bmap *bmap, __u64 *keyp) nilfs_bmap_last_key() argument 227 down_read(&bmap->b_sem); nilfs_bmap_last_key() 228 ret = bmap->b_ops->bop_last_key(bmap, keyp); nilfs_bmap_last_key() 229 up_read(&bmap->b_sem); nilfs_bmap_last_key() 232 ret = nilfs_bmap_convert_error(bmap, __func__, ret); nilfs_bmap_last_key() 237 * nilfs_bmap_delete - delete a key-record pair from a bmap 238 * @bmap: bmap 242 * @key from @bmap. 253 int nilfs_bmap_delete(struct nilfs_bmap *bmap, __u64 key) nilfs_bmap_delete() argument 257 down_write(&bmap->b_sem); nilfs_bmap_delete() 258 ret = nilfs_bmap_do_delete(bmap, key); nilfs_bmap_delete() 259 up_write(&bmap->b_sem); nilfs_bmap_delete() 261 return nilfs_bmap_convert_error(bmap, __func__, ret); nilfs_bmap_delete() 264 static int nilfs_bmap_do_truncate(struct nilfs_bmap *bmap, __u64 key) nilfs_bmap_do_truncate() argument 269 ret = bmap->b_ops->bop_last_key(bmap, &lastkey); nilfs_bmap_do_truncate() 277 ret = nilfs_bmap_do_delete(bmap, lastkey); nilfs_bmap_do_truncate() 280 ret = bmap->b_ops->bop_last_key(bmap, &lastkey); nilfs_bmap_do_truncate() 291 * nilfs_bmap_truncate - truncate a bmap to a specified key 292 * @bmap: bmap 296 * greater than or equal to @key from @bmap. 305 int nilfs_bmap_truncate(struct nilfs_bmap *bmap, __u64 key) nilfs_bmap_truncate() argument 309 down_write(&bmap->b_sem); nilfs_bmap_truncate() 310 ret = nilfs_bmap_do_truncate(bmap, key); nilfs_bmap_truncate() 311 up_write(&bmap->b_sem); nilfs_bmap_truncate() 313 return nilfs_bmap_convert_error(bmap, __func__, ret); nilfs_bmap_truncate() 317 * nilfs_bmap_clear - free resources a bmap holds 318 * @bmap: bmap 320 * Description: nilfs_bmap_clear() frees resources associated with @bmap. 322 void nilfs_bmap_clear(struct nilfs_bmap *bmap) nilfs_bmap_clear() argument 324 down_write(&bmap->b_sem); nilfs_bmap_clear() 325 if (bmap->b_ops->bop_clear != NULL) nilfs_bmap_clear() 326 bmap->b_ops->bop_clear(bmap); nilfs_bmap_clear() 327 up_write(&bmap->b_sem); nilfs_bmap_clear() 332 * @bmap: bmap 345 int nilfs_bmap_propagate(struct nilfs_bmap *bmap, struct buffer_head *bh) nilfs_bmap_propagate() argument 349 down_write(&bmap->b_sem); nilfs_bmap_propagate() 350 ret = bmap->b_ops->bop_propagate(bmap, bh); nilfs_bmap_propagate() 351 up_write(&bmap->b_sem); nilfs_bmap_propagate() 353 return nilfs_bmap_convert_error(bmap, __func__, ret); nilfs_bmap_propagate() 358 * @bmap: bmap 361 void nilfs_bmap_lookup_dirty_buffers(struct nilfs_bmap *bmap, nilfs_bmap_lookup_dirty_buffers() argument 364 if (bmap->b_ops->bop_lookup_dirty_buffers != NULL) nilfs_bmap_lookup_dirty_buffers() 365 bmap->b_ops->bop_lookup_dirty_buffers(bmap, listp); nilfs_bmap_lookup_dirty_buffers() 370 * @bmap: bmap 387 int nilfs_bmap_assign(struct nilfs_bmap *bmap, nilfs_bmap_assign() argument 394 down_write(&bmap->b_sem); nilfs_bmap_assign() 395 ret = bmap->b_ops->bop_assign(bmap, bh, blocknr, binfo); nilfs_bmap_assign() 396 up_write(&bmap->b_sem); nilfs_bmap_assign() 398 return nilfs_bmap_convert_error(bmap, __func__, ret); nilfs_bmap_assign() 403 * @bmap: bmap 417 int nilfs_bmap_mark(struct nilfs_bmap *bmap, __u64 key, int level) nilfs_bmap_mark() argument 421 if (bmap->b_ops->bop_mark == NULL) nilfs_bmap_mark() 424 down_write(&bmap->b_sem); nilfs_bmap_mark() 425 ret = bmap->b_ops->bop_mark(bmap, key, level); nilfs_bmap_mark() 426 up_write(&bmap->b_sem); nilfs_bmap_mark() 428 return nilfs_bmap_convert_error(bmap, __func__, ret); nilfs_bmap_mark() 432 * nilfs_bmap_test_and_clear_dirty - test and clear a bmap dirty state 433 * @bmap: bmap 436 * clear the dirty state of @bmap. 438 * Return Value: 1 is returned if @bmap is dirty, or 0 if clear. 440 int nilfs_bmap_test_and_clear_dirty(struct nilfs_bmap *bmap) nilfs_bmap_test_and_clear_dirty() argument 444 down_write(&bmap->b_sem); nilfs_bmap_test_and_clear_dirty() 445 ret = nilfs_bmap_dirty(bmap); nilfs_bmap_test_and_clear_dirty() 446 nilfs_bmap_clear_dirty(bmap); nilfs_bmap_test_and_clear_dirty() 447 up_write(&bmap->b_sem); nilfs_bmap_test_and_clear_dirty() 455 __u64 nilfs_bmap_data_get_key(const struct nilfs_bmap *bmap, nilfs_bmap_data_get_key() argument 462 bmap->b_inode->i_blkbits); nilfs_bmap_data_get_key() 469 __u64 nilfs_bmap_find_target_seq(const struct nilfs_bmap *bmap, __u64 key) nilfs_bmap_find_target_seq() argument 473 diff = key - bmap->b_last_allocated_key; nilfs_bmap_find_target_seq() 475 (bmap->b_last_allocated_ptr != NILFS_BMAP_INVALID_PTR) && nilfs_bmap_find_target_seq() 476 (bmap->b_last_allocated_ptr + diff > 0)) nilfs_bmap_find_target_seq() 477 return bmap->b_last_allocated_ptr + diff; nilfs_bmap_find_target_seq() 483 __u64 nilfs_bmap_find_target_in_group(const struct nilfs_bmap *bmap) nilfs_bmap_find_target_in_group() argument 485 struct inode *dat = nilfs_bmap_get_dat(bmap); nilfs_bmap_find_target_in_group() 487 unsigned long group = bmap->b_inode->i_ino / entries_per_group; nilfs_bmap_find_target_in_group() 490 (bmap->b_inode->i_ino % NILFS_BMAP_GROUP_DIV) * nilfs_bmap_find_target_in_group() 498 * nilfs_bmap_read - read a bmap from an inode 499 * @bmap: bmap 502 * Description: nilfs_bmap_read() initializes the bmap @bmap. 509 int nilfs_bmap_read(struct nilfs_bmap *bmap, struct nilfs_inode *raw_inode) nilfs_bmap_read() argument 512 memset(bmap->b_u.u_data, 0, NILFS_BMAP_SIZE); nilfs_bmap_read() 514 memcpy(bmap->b_u.u_data, raw_inode->i_bmap, NILFS_BMAP_SIZE); nilfs_bmap_read() 516 init_rwsem(&bmap->b_sem); nilfs_bmap_read() 517 bmap->b_state = 0; nilfs_bmap_read() 518 bmap->b_inode = &NILFS_BMAP_I(bmap)->vfs_inode; nilfs_bmap_read() 519 switch (bmap->b_inode->i_ino) { nilfs_bmap_read() 521 bmap->b_ptr_type = NILFS_BMAP_PTR_P; nilfs_bmap_read() 522 bmap->b_last_allocated_key = 0; nilfs_bmap_read() 523 bmap->b_last_allocated_ptr = NILFS_BMAP_NEW_PTR_INIT; nilfs_bmap_read() 524 lockdep_set_class(&bmap->b_sem, &nilfs_bmap_dat_lock_key); nilfs_bmap_read() 528 bmap->b_ptr_type = NILFS_BMAP_PTR_VS; nilfs_bmap_read() 529 bmap->b_last_allocated_key = 0; nilfs_bmap_read() 530 bmap->b_last_allocated_ptr = NILFS_BMAP_INVALID_PTR; nilfs_bmap_read() 531 lockdep_set_class(&bmap->b_sem, &nilfs_bmap_mdt_lock_key); nilfs_bmap_read() 534 lockdep_set_class(&bmap->b_sem, &nilfs_bmap_mdt_lock_key); nilfs_bmap_read() 537 bmap->b_ptr_type = NILFS_BMAP_PTR_VM; nilfs_bmap_read() 538 bmap->b_last_allocated_key = 0; nilfs_bmap_read() 539 bmap->b_last_allocated_ptr = NILFS_BMAP_INVALID_PTR; nilfs_bmap_read() 543 return (bmap->b_u.u_flags & NILFS_BMAP_LARGE) ? nilfs_bmap_read() 544 nilfs_btree_init(bmap) : nilfs_direct_init(bmap); nilfs_bmap_read() 548 * nilfs_bmap_write - write back a bmap to an inode 549 * @bmap: bmap 552 * Description: nilfs_bmap_write() stores @bmap in @raw_inode. 554 void nilfs_bmap_write(struct nilfs_bmap *bmap, struct nilfs_inode *raw_inode) nilfs_bmap_write() argument 556 down_write(&bmap->b_sem); nilfs_bmap_write() 557 memcpy(raw_inode->i_bmap, bmap->b_u.u_data, nilfs_bmap_write() 559 if (bmap->b_inode->i_ino == NILFS_DAT_INO) nilfs_bmap_write() 560 bmap->b_last_allocated_ptr = NILFS_BMAP_NEW_PTR_INIT; nilfs_bmap_write() 562 up_write(&bmap->b_sem); nilfs_bmap_write() 565 void nilfs_bmap_init_gc(struct nilfs_bmap *bmap) nilfs_bmap_init_gc() argument 567 memset(&bmap->b_u, 0, NILFS_BMAP_SIZE); nilfs_bmap_init_gc() 568 init_rwsem(&bmap->b_sem); nilfs_bmap_init_gc() 569 bmap->b_inode = &NILFS_BMAP_I(bmap)->vfs_inode; nilfs_bmap_init_gc() 570 bmap->b_ptr_type = NILFS_BMAP_PTR_U; nilfs_bmap_init_gc() 571 bmap->b_last_allocated_key = 0; nilfs_bmap_init_gc() 572 bmap->b_last_allocated_ptr = NILFS_BMAP_INVALID_PTR; nilfs_bmap_init_gc() 573 bmap->b_state = 0; nilfs_bmap_init_gc() 574 nilfs_btree_init_gc(bmap); nilfs_bmap_init_gc() 577 void nilfs_bmap_save(const struct nilfs_bmap *bmap, nilfs_bmap_save() argument 580 memcpy(store->data, bmap->b_u.u_data, sizeof(store->data)); nilfs_bmap_save() 581 store->last_allocated_key = bmap->b_last_allocated_key; nilfs_bmap_save() 582 store->last_allocated_ptr = bmap->b_last_allocated_ptr; nilfs_bmap_save() 583 store->state = bmap->b_state; nilfs_bmap_save() 586 void nilfs_bmap_restore(struct nilfs_bmap *bmap, nilfs_bmap_restore() argument 589 memcpy(bmap->b_u.u_data, store->data, sizeof(store->data)); nilfs_bmap_restore() 590 bmap->b_last_allocated_key = store->last_allocated_key; nilfs_bmap_restore() 591 bmap->b_last_allocated_ptr = store->last_allocated_ptr; nilfs_bmap_restore() 592 bmap->b_state = store->state; nilfs_bmap_restore()
|
H A D | direct.c | 118 static int nilfs_direct_insert(struct nilfs_bmap *bmap, __u64 key, __u64 ptr) nilfs_direct_insert() argument 127 if (nilfs_direct_get_ptr(bmap, key) != NILFS_BMAP_INVALID_PTR) nilfs_direct_insert() 130 if (NILFS_BMAP_USE_VBN(bmap)) { nilfs_direct_insert() 131 req.bpr_ptr = nilfs_direct_find_target_v(bmap, key); nilfs_direct_insert() 132 dat = nilfs_bmap_get_dat(bmap); nilfs_direct_insert() 134 ret = nilfs_bmap_prepare_alloc_ptr(bmap, &req, dat); nilfs_direct_insert() 140 nilfs_bmap_commit_alloc_ptr(bmap, &req, dat); nilfs_direct_insert() 141 nilfs_direct_set_ptr(bmap, key, req.bpr_ptr); nilfs_direct_insert() 143 if (!nilfs_bmap_dirty(bmap)) nilfs_direct_insert() 144 nilfs_bmap_set_dirty(bmap); nilfs_direct_insert() 146 if (NILFS_BMAP_USE_VBN(bmap)) nilfs_direct_insert() 147 nilfs_bmap_set_target_v(bmap, key, req.bpr_ptr); nilfs_direct_insert() 149 nilfs_inode_add_blocks(bmap->b_inode, 1); nilfs_direct_insert() 154 static int nilfs_direct_delete(struct nilfs_bmap *bmap, __u64 key) nilfs_direct_delete() argument 161 nilfs_direct_get_ptr(bmap, key) == NILFS_BMAP_INVALID_PTR) nilfs_direct_delete() 164 dat = NILFS_BMAP_USE_VBN(bmap) ? nilfs_bmap_get_dat(bmap) : NULL; nilfs_direct_delete() 165 req.bpr_ptr = nilfs_direct_get_ptr(bmap, key); nilfs_direct_delete() 167 ret = nilfs_bmap_prepare_end_ptr(bmap, &req, dat); nilfs_direct_delete() 169 nilfs_bmap_commit_end_ptr(bmap, &req, dat); nilfs_direct_delete() 170 nilfs_direct_set_ptr(bmap, key, NILFS_BMAP_INVALID_PTR); nilfs_direct_delete() 171 nilfs_inode_sub_blocks(bmap->b_inode, 1); nilfs_direct_delete() 209 static int nilfs_direct_check_insert(const struct nilfs_bmap *bmap, __u64 key) nilfs_direct_check_insert() argument 235 int nilfs_direct_delete_and_convert(struct nilfs_bmap *bmap, nilfs_direct_delete_and_convert() argument 244 ret = bmap->b_ops->bop_delete(bmap, key); nilfs_direct_delete_and_convert() 249 if (bmap->b_ops->bop_clear != NULL) nilfs_direct_delete_and_convert() 250 bmap->b_ops->bop_clear(bmap); nilfs_direct_delete_and_convert() 253 dptrs = nilfs_direct_dptrs(bmap); nilfs_direct_delete_and_convert() 264 nilfs_direct_init(bmap); nilfs_direct_delete_and_convert() 268 static int nilfs_direct_propagate(struct nilfs_bmap *bmap, nilfs_direct_propagate() argument 277 if (!NILFS_BMAP_USE_VBN(bmap)) nilfs_direct_propagate() 280 dat = nilfs_bmap_get_dat(bmap); nilfs_direct_propagate() 281 key = nilfs_bmap_data_get_key(bmap, bh); nilfs_direct_propagate() 282 ptr = nilfs_direct_get_ptr(bmap, key); nilfs_direct_propagate() 290 bmap->b_ptr_type == NILFS_BMAP_PTR_VS); nilfs_direct_propagate() 292 nilfs_direct_set_ptr(bmap, key, newreq.pr_entry_nr); nilfs_direct_propagate() 333 static int nilfs_direct_assign(struct nilfs_bmap *bmap, nilfs_direct_assign() argument 341 key = nilfs_bmap_data_get_key(bmap, *bh); nilfs_direct_assign() 347 ptr = nilfs_direct_get_ptr(bmap, key); nilfs_direct_assign() 354 return NILFS_BMAP_USE_VBN(bmap) ? nilfs_direct_assign() 355 nilfs_direct_assign_v(bmap, key, ptr, bh, blocknr, binfo) : nilfs_direct_assign() 356 nilfs_direct_assign_p(bmap, key, ptr, bh, blocknr, binfo); nilfs_direct_assign() 382 int nilfs_direct_init(struct nilfs_bmap *bmap) nilfs_direct_init() argument 384 bmap->b_ops = &nilfs_direct_ops; nilfs_direct_init()
|
H A D | bmap.h | 2 * bmap.h - NILFS block mapping. 41 * union nilfs_bmap_ptr_req - request for bmap ptr 42 * @bpr_ptr: bmap pointer 51 * struct nilfs_bmap_stats - bmap statistics 59 * struct nilfs_bmap_operations - bmap operation table 101 * struct nilfs_bmap - bmap structure 104 * @b_inode: owner of bmap 105 * @b_ops: bmap operation table 135 #define NILFS_BMAP_USE_VBN(bmap) ((bmap)->b_ptr_type > 0) 141 * struct nilfs_bmap_store - shadow copy of bmap state 145 * @state: cached value of state field of bmap structure 158 int nilfs_bmap_insert(struct nilfs_bmap *bmap, __u64 key, unsigned long rec); 159 int nilfs_bmap_delete(struct nilfs_bmap *bmap, __u64 key); 160 int nilfs_bmap_seek_key(struct nilfs_bmap *bmap, __u64 start, __u64 *keyp); 161 int nilfs_bmap_last_key(struct nilfs_bmap *bmap, __u64 *keyp); 162 int nilfs_bmap_truncate(struct nilfs_bmap *bmap, __u64 key); 176 static inline int nilfs_bmap_lookup(struct nilfs_bmap *bmap, __u64 key, nilfs_bmap_lookup() argument 179 return nilfs_bmap_lookup_at_level(bmap, key, 1, ptr); nilfs_bmap_lookup() 187 static inline int nilfs_bmap_prepare_alloc_ptr(struct nilfs_bmap *bmap, nilfs_bmap_prepare_alloc_ptr() argument 194 req->bpr_ptr = bmap->b_last_allocated_ptr++; nilfs_bmap_prepare_alloc_ptr() 198 static inline void nilfs_bmap_commit_alloc_ptr(struct nilfs_bmap *bmap, nilfs_bmap_commit_alloc_ptr() argument 206 static inline void nilfs_bmap_abort_alloc_ptr(struct nilfs_bmap *bmap, nilfs_bmap_abort_alloc_ptr() argument 213 bmap->b_last_allocated_ptr--; nilfs_bmap_abort_alloc_ptr() 216 static inline int nilfs_bmap_prepare_end_ptr(struct nilfs_bmap *bmap, nilfs_bmap_prepare_end_ptr() argument 223 static inline void nilfs_bmap_commit_end_ptr(struct nilfs_bmap *bmap, nilfs_bmap_commit_end_ptr() argument 229 bmap->b_ptr_type == NILFS_BMAP_PTR_VS); nilfs_bmap_commit_end_ptr() 232 static inline void nilfs_bmap_abort_end_ptr(struct nilfs_bmap *bmap, nilfs_bmap_abort_end_ptr() argument 240 static inline void nilfs_bmap_set_target_v(struct nilfs_bmap *bmap, __u64 key, nilfs_bmap_set_target_v() argument 243 bmap->b_last_allocated_key = key; nilfs_bmap_set_target_v() 244 bmap->b_last_allocated_ptr = ptr; nilfs_bmap_set_target_v() 254 /* Assume that bmap semaphore is locked. */ nilfs_bmap_dirty() 255 static inline int nilfs_bmap_dirty(const struct nilfs_bmap *bmap) nilfs_bmap_dirty() argument 257 return !!(bmap->b_state & NILFS_BMAP_DIRTY); nilfs_bmap_dirty() 260 /* Assume that bmap semaphore is locked. */ nilfs_bmap_set_dirty() 261 static inline void nilfs_bmap_set_dirty(struct nilfs_bmap *bmap) nilfs_bmap_set_dirty() argument 263 bmap->b_state |= NILFS_BMAP_DIRTY; nilfs_bmap_set_dirty() 266 /* Assume that bmap semaphore is locked. */ nilfs_bmap_clear_dirty() 267 static inline void nilfs_bmap_clear_dirty(struct nilfs_bmap *bmap) nilfs_bmap_clear_dirty() argument 269 bmap->b_state &= ~NILFS_BMAP_DIRTY; nilfs_bmap_clear_dirty()
|
H A D | Makefile | 3 btnode.o bmap.o btree.o direct.o dat.o recovery.o \
|
H A D | direct.h | 28 #include "bmap.h"
|
H A D | mdt.h | 33 * @bmap_store: shadow copy of bmap state 53 * @mi_shadow: shadow of bmap and page caches
|
H A D | btree.h | 31 #include "bmap.h"
|
H A D | nilfs.h | 33 #include "bmap.h" 84 NILFS_BMAP_I(const struct nilfs_bmap *bmap) NILFS_BMAP_I() argument 86 return container_of(bmap, struct nilfs_inode_info, i_bmap_data); NILFS_BMAP_I() 108 NILFS_I_BMAP, /* has bmap and btnode_cache */
|
H A D | btree.c | 34 static void __nilfs_btree_init(struct nilfs_bmap *bmap); 638 * @btree: bmap struct of btree 1848 * @bmap: 2390 static void __nilfs_btree_init(struct nilfs_bmap *bmap) __nilfs_btree_init() argument 2392 bmap->b_ops = &nilfs_btree_ops; __nilfs_btree_init() 2393 bmap->b_nchildren_per_block = __nilfs_btree_init() 2394 NILFS_BTREE_NODE_NCHILDREN_MAX(nilfs_btree_node_size(bmap)); __nilfs_btree_init() 2397 int nilfs_btree_init(struct nilfs_bmap *bmap) nilfs_btree_init() argument 2401 __nilfs_btree_init(bmap); nilfs_btree_init() 2403 if (nilfs_btree_root_broken(nilfs_btree_get_root(bmap), nilfs_btree_init() 2404 bmap->b_inode->i_ino)) nilfs_btree_init() 2409 void nilfs_btree_init_gc(struct nilfs_bmap *bmap) nilfs_btree_init_gc() argument 2411 bmap->b_ops = &nilfs_btree_ops_gc; nilfs_btree_init_gc() 2412 bmap->b_nchildren_per_block = nilfs_btree_init_gc() 2413 NILFS_BTREE_NODE_NCHILDREN_MAX(nilfs_btree_node_size(bmap)); nilfs_btree_init_gc()
|
H A D | mdt.c | 196 /* abort readahead if bmap lookup failed */ nilfs_mdt_read_block() 524 * nilfs_mdt_save_to_shadow_map - copy bmap and dirty pages to shadow map 613 * nilfs_mdt_restore_from_shadow_map - restore dirty pages and bmap state
|
H A D | ioctl.c | 35 #include "bmap.h" 486 struct nilfs_bmap *bmap = NILFS_I(nilfs->ns_dat)->i_bmap; nilfs_ioctl_do_get_bdescs() local 492 ret = nilfs_bmap_lookup_at_level(bmap, nilfs_ioctl_do_get_bdescs() 784 struct nilfs_bmap *bmap = NILFS_I(nilfs->ns_dat)->i_bmap; nilfs_ioctl_mark_blocks_dirty() local 790 ret = nilfs_bmap_lookup_at_level(bmap, nilfs_ioctl_mark_blocks_dirty() 810 ret = nilfs_bmap_mark(bmap, bdescs[i].bd_offset, nilfs_ioctl_mark_blocks_dirty()
|
H A D | inode.c | 706 deadlock of bmap. This delays update of i_bmap to just nilfs_update_inode() 740 "failed to truncate bmap (ino=%lu, err=%d)", nilfs_truncate_bmap()
|
H A D | the_nilfs.c | 363 max_bits = blkbits + NILFS_BMAP_KEY_BIT; /* bmap size limit */ nilfs_max_size()
|
/linux-4.1.27/fs/gfs2/ |
H A D | Makefile | 3 gfs2-y := acl.o bmap.o dir.o xattr.o glock.o \
|
H A D | trace_gfs2.h | 424 /* Section 3 - bmap 462 TP_printk("%u,%u bmap %llu map %llu/%lu to %llu flags:%08lx %s %d", 502 TP_printk("%u,%u bmap %llu alloc %llu/%lu %s rg:%llu rf:%u rr:%lu", 541 TP_printk("%u,%u bmap %llu resrv %llu rg:%llu rf:%lu rr:%lu %s f:%lu",
|
H A D | aops.c | 28 #include "bmap.h" 1175 .bmap = gfs2_bmap, 1192 .bmap = gfs2_bmap, 1209 .bmap = gfs2_bmap,
|
H A D | bmap.c | 19 #include "bmap.h" 442 * blocks are available, there will only be one request per bmap call) 1332 * gfs2_free_journal_extents - Free cached journal bmap info 1382 * gfs2_map_journal_extents - Cache journal bmap info 1439 fs_warn(sdp, "bmap=%d lblock=%llu block=%llu, state=0x%08lx, size=%llu\n", gfs2_map_journal_extents()
|
H A D | glops.c | 19 #include "bmap.h"
|
H A D | recovery.c | 20 #include "bmap.h"
|
H A D | file.c | 32 #include "bmap.h" 344 * gfs2_allocate_page_backing - Use bmap to allocate blocks
|
H A D | log.c | 27 #include "bmap.h"
|
H A D | ops_fstype.c | 29 #include "bmap.h"
|
H A D | inode.c | 27 #include "bmap.h"
|
H A D | quota.c | 65 #include "bmap.h"
|
H A D | super.c | 33 #include "bmap.h"
|
H A D | dir.c | 75 #include "bmap.h"
|
H A D | glock.c | 48 #include "bmap.h"
|
/linux-4.1.27/fs/affs/ |
H A D | bitmap.c | 43 u32 blk, bmap, bit, mask, tmp; affs_free_block() local 52 bmap = blk / sbi->s_bmap_bits; affs_free_block() 54 bm = &sbi->s_bitmap[bmap]; affs_free_block() 59 if (sbi->s_last_bmap != bmap) { affs_free_block() 65 sbi->s_last_bmap = bmap; affs_free_block() 121 u32 blk, bmap, bit, mask, mask2, tmp; affs_alloc_block() local 144 bmap = blk / sbi->s_bmap_bits; affs_alloc_block() 145 bm = &sbi->s_bitmap[bmap]; affs_alloc_block() 153 /* search for the next bmap buffer with free bits */ affs_alloc_block() 158 bmap++; affs_alloc_block() 160 if (bmap < sbi->s_bmap_count) affs_alloc_block() 163 bmap = 0; affs_alloc_block() 166 blk = bmap * sbi->s_bmap_bits; affs_alloc_block() 171 if (sbi->s_last_bmap != bmap) { affs_alloc_block() 177 sbi->s_last_bmap = bmap; affs_alloc_block() 196 * if scan didn't start at 0, try next bmap affs_alloc_block()
|
H A D | file.c | 440 .bmap = _affs_bmap
|
/linux-4.1.27/fs/jfs/ |
H A D | resize.c | 37 /* convert block number to bmap file page number */ 70 struct bmap *bmp = sbi->bmap; jfs_extendfs() 297 /* number of data pages of new bmap file: jfs_extendfs() 309 * at end of bmap by mkfs() or previous extendfs(); jfs_extendfs() 333 * update bmap control page; jfs_extendfs() 354 /* compute number of data pages of current bmap file */ jfs_extendfs() 362 * grow bmap file for the new map pages required: jfs_extendfs() 365 * bmap file only grows sequentially, i.e., both data pages jfs_extendfs() 368 * by washing away bmap file of pages outside s_size boundary; jfs_extendfs() 372 * (note: bmap is created with di_mode = IFJOURNAL|IFREG); jfs_extendfs() 374 * journaling of bmap file growth is not required since jfs_extendfs() 375 * logredo() do/can not use log records of bmap file growth jfs_extendfs() 378 /* synchronous write of data pages: bmap data pages are jfs_extendfs() 398 /* update bmap file size */ jfs_extendfs() 425 /* finalize bmap */ jfs_extendfs() 457 /* sync log to skip log replay of bmap file growth transaction; */ jfs_extendfs() 461 * synchronous write bmap global control page; jfs_extendfs() 471 * copy primary bmap inode to secondary bmap inode jfs_extendfs() 476 printk(KERN_ERR "jfs_extendfs: diReadSpecial(bmap) failed\n"); jfs_extendfs()
|
H A D | file.c | 79 atomic_inc( &jfs_sb->bmap->db_active[ji->active_ag]); jfs_open() 92 struct bmap *bmap = JFS_SBI(inode->i_sb)->bmap; jfs_release() local 93 atomic_dec(&bmap->db_active[ji->active_ag]); jfs_release()
|
H A D | jfs_dmap.c | 52 * write inode lock of the bmap inode. requests starting at the top 60 * write information maintained in the bmap descriptor (i.e. total 77 static void dbAllocBits(struct bmap * bmp, struct dmap * dp, s64 blkno, 83 static int dbAdjCtl(struct bmap * bmp, s64 blkno, int newval, int alloc, 85 static int dbAllocAny(struct bmap * bmp, s64 nblocks, int l2nb, s64 * results); 86 static int dbAllocNext(struct bmap * bmp, struct dmap * dp, s64 blkno, 88 static int dbAllocNear(struct bmap * bmp, struct dmap * dp, s64 blkno, 91 static int dbAllocDmap(struct bmap * bmp, struct dmap * dp, s64 blkno, 93 static int dbAllocDmapLev(struct bmap * bmp, struct dmap * dp, int nblocks, 96 static int dbAllocAG(struct bmap * bmp, int agno, s64 nblocks, int l2nb, 98 static int dbAllocCtl(struct bmap * bmp, s64 nblocks, int l2nb, s64 blkno, 102 static int dbFindCtl(struct bmap * bmp, int l2nb, int level, s64 * blkno); 104 static int dbFreeBits(struct bmap * bmp, struct dmap * dp, s64 blkno, 106 static int dbFreeDmap(struct bmap * bmp, struct dmap * dp, s64 blkno, 114 static int dbAllocDmapBU(struct bmap * bmp, struct dmap * dp, s64 blkno, 154 * memory is allocated for the in-core bmap descriptor and 167 struct bmap *bmp; dbMount() 173 * allocate/initialize the in-memory bmap descriptor dbMount() 175 /* allocate memory for the in-memory bmap descriptor */ dbMount() 176 bmp = kmalloc(sizeof(struct bmap), GFP_KERNEL); dbMount() 180 /* read the on-disk bmap descriptor. */ dbMount() 189 /* copy the on-disk bmap descriptor to its in-memory version. */ dbMount() 211 /* bind the bmap inode and the bmap descriptor to each other. */ dbMount() 213 JFS_SBI(ipbmap->i_sb)->bmap = bmp; dbMount() 218 * allocate/initialize the bmap lock dbMount() 232 * the in-core bmap descriptor is written to disk and 244 struct bmap *bmp = JFS_SBI(ipbmap->i_sb)->bmap; dbUnmount() 254 /* free the memory for the in-memory bmap. */ dbUnmount() 266 struct bmap *bmp = JFS_SBI(ipbmap->i_sb)->bmap; dbSync() 271 * write bmap global control page dbSync() 273 /* get the buffer for the on-disk bmap descriptor. */ dbSync() 281 /* copy the in-memory version of the bmap to the on-disk version */ dbSync() 304 * write out dirty pages of bmap dbSync() 338 struct bmap *bmp = JFS_SBI(ip->i_sb)->bmap; dbFree() 429 struct bmap *bmp = JFS_SBI(ipbmap->i_sb)->bmap; dbUpdatePMap() 610 struct bmap *bmp = JFS_SBI(ipbmap->i_sb)->bmap; dbNextAG() 704 struct bmap *bmp; dbAlloc() 721 bmp = JFS_SBI(ip->i_sb)->bmap; dbAlloc() 897 struct bmap *bmp = JFS_SBI(ip->i_sb)->bmap; dbAllocExact() 1035 struct bmap *bmp; dbExtend() 1055 bmp = sbi->bmap; dbExtend() 1113 * bmp - pointer to bmap descriptor 1125 static int dbAllocNext(struct bmap * bmp, struct dmap * dp, s64 blkno, dbAllocNext() 1241 * bmp - pointer to bmap descriptor 1257 dbAllocNear(struct bmap * bmp, dbAllocNear() 1351 * bmp - pointer to bmap descriptor 1366 dbAllocAG(struct bmap * bmp, int agno, s64 nblocks, int l2nb, s64 * results) dbAllocAG() 1551 * bmp - pointer to bmap descriptor 1564 static int dbAllocAny(struct bmap * bmp, s64 nblocks, int l2nb, s64 * results) dbAllocAny() 1622 struct bmap *bmp = JFS_SBI(ip->i_sb)->bmap; dbDiscardAG() 1713 * bmp - pointer to bmap descriptor 1727 static int dbFindCtl(struct bmap * bmp, int l2nb, int level, s64 * blkno) dbFindCtl() 1830 * bmp - pointer to bmap descriptor 1846 dbAllocCtl(struct bmap * bmp, s64 nblocks, int l2nb, s64 blkno, s64 * results) dbAllocCtl() 1981 * mp - pointer to bmap descriptor 1997 dbAllocDmapLev(struct bmap * bmp, dbAllocDmapLev() 2049 * bmp - pointer to bmap descriptor 2060 static int dbAllocDmap(struct bmap * bmp, struct dmap * dp, s64 blkno, dbAllocDmap() 2104 * bmp - pointer to bmap descriptor 2115 static int dbFreeDmap(struct bmap * bmp, struct dmap * dp, s64 blkno, dbFreeDmap() 2168 * bmp - pointer to bmap descriptor 2177 static void dbAllocBits(struct bmap * bmp, struct dmap * dp, s64 blkno, dbAllocBits() 2315 * bmp - pointer to bmap descriptor 2324 static int dbFreeBits(struct bmap * bmp, struct dmap * dp, s64 blkno, dbFreeBits() 2491 * bmp - pointer to bmap descriptor 2508 dbAdjCtl(struct bmap * bmp, s64 blkno, int newval, int alloc, int level) dbAdjCtl() 2622 * the bmap control page to reflect the size dbAdjCtl() 3215 struct bmap *bmp = JFS_SBI(ip->i_sb)->bmap; dbAllocBottomUp() 3263 static int dbAllocDmapBU(struct bmap * bmp, struct dmap * dp, s64 blkno, dbAllocDmapBU() 3370 * FUNCTION: extend bmap from blkno for nblocks; 3371 * dbExtendFS() updates bmap ready for dbAllocBottomUp(); 3395 struct bmap *bmp = sbi->bmap; dbExtendFS() 3405 * initialize bmap control page. dbExtendFS() 3407 * all the data in bmap control page should exclude dbExtendFS() 3460 * extend bmap dbExtendFS() 3603 /* summarize in global bmap page */ dbExtendFS() 3627 /* summarize in global bmap page */ dbExtendFS() 3645 * finalize bmap control page dbExtendFS() 3658 struct bmap *bmp = JFS_SBI(ipbmap->i_sb)->bmap; dbFinalizeBmap() 3664 * finalize bmap control page dbFinalizeBmap()
|
H A D | jfs_discard.c | 83 struct bmap *bmp = JFS_SBI(ip->i_sb)->bmap; jfs_ioc_trim()
|
H A D | super.c | 141 struct bmap *bmap = JFS_SBI(inode->i_sb)->bmap; jfs_destroy_inode() local 142 atomic_dec(&bmap->db_active[ji->active_ag]); jfs_destroy_inode() 158 buf->f_blocks = sbi->bmap->db_mapsize; jfs_statfs() 159 buf->f_bfree = sbi->bmap->db_nfree; jfs_statfs() 160 buf->f_bavail = sbi->bmap->db_nfree; jfs_statfs() 171 ((sbi->bmap->db_nfree >> imap->im_l2nbperiext) jfs_statfs()
|
H A D | jfs_incore.h | 192 struct bmap *bmap; /* incore bmap descriptor */ member in struct:jfs_sb_info
|
H A D | jfs_dmap.h | 42 #define BMAPBLKNO 0 /* lblkno of bmap within the map */ 134 #define BLKTOAG(b,sbi) ((b) >> ((sbi)->bmap->db_agl2size)) 140 ((s64)(a) << (JFS_SBI((ip)->i_sb)->bmap->db_agl2size)) 243 struct bmap { struct
|
H A D | jfs_txnmgr.c | 1436 * function: log inode tlock and format maplock to update bmap; 1483 * imap and bmap for free of the extent; diLog() 1502 /* update bmap */ diLog() 1519 /* log LOG_UPDATEMAP for logredo() to update bmap for diLog() 1538 /* update bmap */ diLog() 1595 * function: log dtree tlock and format maplock to update bmap; 1624 * freelist and update bmap for alloc of the new page; dtLog() 1679 * to start NoRedoPage filter and to update bmap for free dtLog() 1698 * function: log xtree tlock and format maplock to update bmap; 1743 * logredo() will update bmap for alloc of new/extended xtLog() 1816 * (page will be invalidated after log is written and bmap xtLog() 1856 * for logredo() to update bmap; xtLog() 1870 /* format a maplock for txUpdateMap() to update bmap xtLog() 1954 * logredo() will update bmap for alloc of new/extended xtLog() 1970 /* init LOG_UPDATEMAP for logredo() to update bmap for xtLog() 1992 * for logredo() to update bmap; xtLog() 2010 * format maplock(s) for txUpdateMap() to update bmap xtLog() 2039 /* format a maplock for txUpdateMap() to update bmap xtLog() 2060 /* format a maplock for txUpdateMap() to update bmap xtLog() 2110 /* (N.B. currently, logredo() does NOT update bmap mapLog() 2114 * to update bmap for free of src relocated page; mapLog() 2138 /* log LOG_UPDATEMAP for logredo() to update bmap for mapLog() 2162 /* update bmap */ mapLog()
|
H A D | jfs_extent.c | 515 struct bmap *bmp = sbi->bmap; extBalloc()
|
H A D | inode.c | 366 .bmap = jfs_bmap,
|
H A D | jfs_xtree.c | 2778 * update of bmap for the free of source extent xtRelocate() 2780 * update of bmap for the allocation of destination extent xtRelocate() 2782 * update of bmap for the extents covered by xad entries in xtRelocate() 2787 * be scanned for bmap update (logredo() always xtRelocate() 2788 * scan xtpage REDOPAGE image for bmap update); xtRelocate() 2823 * bmap for free of source data extent), and update bmap for xtRelocate() 2830 * filter and will also update bmap for free of the source xtRelocate() 2831 * xtpage), and update bmap for free of the source xtpage; xtRelocate() 2849 * update which will write LOG_REDOPAGE and update bmap for xtRelocate()
|
H A D | jfs_dtree.c | 2558 * after image and update bmap for allocation of the dtRelocate() 2559 * dst extent), and update bmap for allocation of dtRelocate() 2588 * will also force a bmap update ). dtRelocate() 2596 * filter and will also update bmap for free of the source dtRelocate() 2597 * dtpage), and upadte bmap for free of the source dtpage; dtRelocate()
|
H A D | jfs_imap.c | 1381 if (atomic_read(&JFS_SBI(pip->i_sb)->bmap->db_active[agno])) { diAlloc() 1722 int maxag = JFS_SBI(imap->im_ipimap->i_sb)->bmap->db_maxag; diAllocAny() 2268 hint = ((s64) agno << sbi->bmap->db_agl2size) - 1; diNewExt() 2864 struct bmap *mp = JFS_SBI(ipbmap->i_sb)->bmap; diExtendFS()
|
/linux-4.1.27/drivers/net/ethernet/brocade/bna/ |
H A D | bnad_ethtool.c | 548 u32 bmap; bnad_get_strings() local 561 bmap = bna_tx_rid_mask(&bnad->bna); bnad_get_strings() 562 for (i = 0; bmap; i++) { bnad_get_strings() 563 if (bmap & 1) { bnad_get_strings() 589 bmap >>= 1; bnad_get_strings() 592 bmap = bna_rx_rid_mask(&bnad->bna); bnad_get_strings() 593 for (i = 0; bmap; i++) { bnad_get_strings() 594 if (bmap & 1) { bnad_get_strings() 616 bmap >>= 1; bnad_get_strings() 724 u32 bmap; bnad_get_stats_count_locked() local 726 bmap = bna_tx_rid_mask(&bnad->bna); bnad_get_stats_count_locked() 727 for (i = 0; bmap; i++) { bnad_get_stats_count_locked() 728 if (bmap & 1) bnad_get_stats_count_locked() 730 bmap >>= 1; bnad_get_stats_count_locked() 732 bmap = bna_rx_rid_mask(&bnad->bna); bnad_get_stats_count_locked() 733 for (i = 0; bmap; i++) { bnad_get_stats_count_locked() 734 if (bmap & 1) bnad_get_stats_count_locked() 736 bmap >>= 1; bnad_get_stats_count_locked() 857 u32 bmap; bnad_get_ethtool_stats() local 896 bmap = bna_tx_rid_mask(&bnad->bna); bnad_get_ethtool_stats() 897 for (i = 0; bmap; i++) { bnad_get_ethtool_stats() 898 if (bmap & 1) { bnad_get_ethtool_stats() 905 bmap >>= 1; bnad_get_ethtool_stats() 909 bmap = bna_rx_rid_mask(&bnad->bna); bnad_get_ethtool_stats() 910 for (i = 0; bmap; i++) { bnad_get_ethtool_stats() 911 if (bmap & 1) { bnad_get_ethtool_stats() 918 bmap >>= 1; bnad_get_ethtool_stats()
|
H A D | bnad.c | 2444 u32 bmap; bnad_netdev_hwstats_fill() local 2466 bmap = bna_rx_rid_mask(&bnad->bna); bnad_netdev_hwstats_fill() 2467 for (i = 0; bmap; i++) { bnad_netdev_hwstats_fill() 2468 if (bmap & 1) { bnad_netdev_hwstats_fill() 2474 bmap >>= 1; bnad_netdev_hwstats_fill()
|
/linux-4.1.27/fs/freevxfs/ |
H A D | vxfs_bmap.c | 54 * vxfs_bmap_ext4 - do bmap for ext4 extents 55 * @ip: pointer to the inode we do bmap for 59 * vxfs_bmap_ext4 performs the bmap operation for inodes with 112 * @ip: pointer to the inode we do bmap for 190 * vxfs_bmap_typed - bmap for typed extents 191 * @ip: pointer to the inode we do bmap for 195 * Performs the bmap operation for typed extents. 248 * vxfs_bmap1 - vxfs-internal bmap operation 249 * @ip: pointer to the inode we do bmap for
|
H A D | vxfs_subr.c | 46 .bmap = vxfs_bmap,
|
/linux-4.1.27/fs/xfs/libxfs/ |
H A D | xfs_bmap_btree.c | 95 * Convert a compressed bmap extent record to an uncompressed form. 132 * Extract the blockcount field from an in memory bmap extent record. 142 * Extract the startblock field from an in memory bmap extent record. 153 * Extract the startoff field from an in memory bmap extent record. 175 * Extract the blockcount field from an on disk bmap extent record. 185 * Extract the startoff field from a disk format bmap extent record. 197 * Set all the fields in a bmap extent record from the arguments. 224 * Set all the fields in a bmap extent record from the uncompressed form. 237 * Set all the fields in a disk format bmap extent record from the arguments. 265 * Set all the fields in a bmap extent record from the uncompressed form. 277 * Set the blockcount field in a bmap extent record. 290 * Set the startblock field in a bmap extent record. 305 * Set the startoff field in a bmap extent record. 319 * Set the extent state field in a bmap extent record. 774 * Allocate a new bmap btree cursor. 776 struct xfs_btree_cur * /* new bmap btree cursor */ xfs_bmbt_init_cursor() 811 * Calculate number of records in a bmap btree block. 827 * Calculate number of records in a bmap btree inode root.
|
H A D | xfs_trans_resv.c | 87 * - two inode forks containing bmap btree root blocks. 172 * the inode's bmap btree: max depth * block size 176 * And the bmap_finish transaction can free bmap blocks in a join: 201 * the inode's bmap btree: (max depth + 1) * block size 202 * And the bmap_finish transaction can free the blocks and bmap blocks: 233 * the two directory bmap btrees: 2 * max depth * block size 234 * And the bmap_finish transaction can free dir and bmap blocks (two sets 235 * of bmap blocks) giving: 272 * the directory bmap btree could join or split: (max depth + v2) * blocksize 273 * And the bmap_finish transaction can free some bmap blocks giving: 310 * the directory bmap btree could join or split: (max depth + v2) * blocksize 311 * And the bmap_finish transaction can free the dir and bmap blocks giving: 344 * the directory inode's bmap btree: (max depth + v2) * block size 526 * bmap btree for bitmap/summary inode: max depth * blocksize 601 * bmap blocks for the new directory block 621 * the inode's bmap btree: max depth * block size 622 * And the bmap_finish transaction can free the blocks and bmap blocks: 665 * the inode bmap btree could join or split: max depth * block size 667 * blocks needed for the 1st bmap, here we calculate out the space unit for 685 * the inode bmap btree could join or split: max depth * block size
|
H A D | xfs_dir2.c | 261 xfs_fsblock_t *first, /* bmap's firstblock */ xfs_dir_createname() 262 xfs_bmap_free_t *flist, /* bmap's freeblock list */ xfs_dir_createname() 263 xfs_extlen_t total) /* bmap's total block count */ xfs_dir_createname() 435 xfs_fsblock_t *first, /* bmap's firstblock */ xfs_dir_removename() 436 xfs_bmap_free_t *flist, /* bmap's freeblock list */ xfs_dir_removename() 437 xfs_extlen_t total) /* bmap's total block count */ xfs_dir_removename() 497 xfs_fsblock_t *first, /* bmap's firstblock */ xfs_dir_replace() 498 xfs_bmap_free_t *flist, /* bmap's freeblock list */ xfs_dir_replace() 499 xfs_extlen_t total) /* bmap's total block count */ xfs_dir_replace() 686 * would cause a bmap btree split or conversion from extents xfs_dir2_shrink_inode()
|
H A D | xfs_alloc.h | 62 * data blocks, freelist blocks, and potential file data bmap 66 * block for the additional bmap btree block due to a split of the 67 * bmap btree of the file. The result of this may lead to an 72 * needed freelist blocks is 4 fsbs _per AG_, a potential split of file's bmap
|
H A D | xfs_da_btree.h | 72 xfs_fsblock_t *firstblock; /* ptr to firstblock for bmap calls */ 75 xfs_extlen_t total; /* total blocks needed, for 1st bmap */
|
H A D | xfs_bmap_btree.h | 100 * Maximum number of bmap btree levels.
|
H A D | xfs_trans_resv.h | 83 * bmap btree: (levels + 2) * max depth * block size
|
H A D | xfs_bmap.h | 35 struct xfs_bmap_free *flist; /* bmap freelist */
|
H A D | xfs_dir2.h | 148 * Direct call from the bmap code, bypassing the generic directory layer.
|
H A D | xfs_inode_fork.h | 82 #define XFS_IFBROOT 0x04 /* i_broot points to the bmap b-tree root */
|
H A D | xfs_bmap.c | 57 * Compute and fill in the value of the maximum depth of a bmap btree 492 * Add bmap trace insert entries for all the contents of the extent records. 561 * bmap free list manipulation functions 733 xfs_btree_cur_t *cur; /* bmap btree cursor */ xfs_bmap_extents_to_btree() 865 * (The bmap-level manipulations are ok, though). 1034 xfs_btree_cur_t *cur; /* bmap btree cursor */ xfs_bmap_add_attrfork_extents() 1339 * Check all attribute bmap btree records and xfs_bmap_read_extents() 1340 * any "older" data bmap btree records for a xfs_bmap_read_extents() 3354 struct xfs_bmalloca *ap) /* bmap alloc argument struct */ xfs_bmap_adjacent() 3641 struct xfs_bmalloca *ap) /* bmap alloc argument struct */ xfs_bmap_btalloc() 3892 struct xfs_bmalloca *ap) /* bmap alloc argument struct */ xfs_bmap_alloc() 4287 * for in this bmap call but that wouldn't be as good. xfs_bmapi_allocate() 5018 xfs_btree_cur_t *cur; /* bmap btree cursor */ xfs_bunmapi() 5407 * A bmap extent shift adjusts the file offset of an extent to fill a preceding
|
H A D | xfs_dir2_leaf.c | 1429 * allocation of a bmap btree block to do so. xfs_dir2_leaf_removename()
|
H A D | xfs_da_btree.c | 2107 * a bmap btree split to do that.
|
H A D | xfs_btree.c | 309 * Can't free a bmap cursor without having dealt with the xfs_btree_del_cursor()
|
/linux-4.1.27/arch/sparc/mm/ |
H A D | io-unit.c | 115 nexti: scan = find_next_zero_bit(iounit->bmap, limit, scan); iounit_get_area() 128 if (test_bit(scan++, iounit->bmap)) iounit_get_area() 135 set_bit(scan, iounit->bmap); iounit_get_area() 179 clear_bit(vaddr, iounit->bmap); iounit_release_scsi_one() 196 clear_bit(vaddr, iounit->bmap); iounit_release_scsi_sgl()
|
/linux-4.1.27/fs/hpfs/ |
H A D | file.c | 34 * generic_file_read often calls bmap with non-existing sector, 53 if (hpfs_chk_sectors(inode->i_sb, disk_secno, 1, "bmap")) return 0; hpfs_bmap() 194 .bmap = _hpfs_bmap
|
/linux-4.1.27/fs/xfs/ |
H A D | xfs_aops.h | 24 * Types of I/O for bmap clustering and I/O completion tracking.
|
H A D | xfs_bmap_util.h | 39 /* bmap to userspace formatter - copy to user & advance pointer */
|
H A D | xfs_mount.h | 89 uint m_bmap_dmxr[2]; /* max bmap btree records */ 90 uint m_bmap_dmnr[2]; /* min bmap btree records */
|
H A D | xfs_dir2_readdir.c | 346 * offset based on the last bmap value received. Otherwise, xfs_dir2_leaf_readbuf() 497 * Set up to bmap a number of blocks based on the caller's xfs_dir2_leaf_getdents()
|
H A D | xfs_bmap_util.c | 49 * bmap code does. 123 * The bmap free list will be cleaned up at a xfs_bmap_finish() 147 struct xfs_bmalloca *ap) /* bmap alloc argument struct */ xfs_bmap_rtalloc() 492 struct getbmapx *bmv, /* user bmap structure */ xfs_getbmap() 1075 error0: /* Cancel bmap, unlock inode, unreserve quota blocks, cancel trans */ xfs_alloc_file_space()
|
H A D | xfs_symlink.c | 275 * Initialize the bmap freelist prior to calling either xfs_symlink()
|
H A D | xfs_dquot.c | 318 * Initialize the bmap freelist prior to calling bmapi code. xfs_qm_dqalloc()
|
H A D | xfs_iops.c | 1072 /* Set up bmap header for xfs internal routine */ xfs_vn_fiemap()
|
H A D | xfs_inode.c | 2565 * possible bmap insert(s). If we can't get the space xfs_remove() 2566 * reservation then we use 0 instead, and avoid the bmap xfs_remove() 2567 * btree insert(s) in the directory code by, if the bmap xfs_remove()
|
H A D | xfs_aops.c | 1926 .bmap = xfs_vm_bmap,
|
/linux-4.1.27/arch/sparc/include/asm/ |
H A D | io-unit.h | 44 unsigned long bmap[(IOUNIT_DMA_SIZE >> (PAGE_SHIFT + 3)) / sizeof(unsigned long)]; member in struct:iounit_struct
|
/linux-4.1.27/fs/hfs/ |
H A D | btree.c | 293 printk(KERN_DEBUG "create new bmap node...\n"); hfs_bmap_alloc() 334 pr_crit("unable to free bnode %u. bmap not found!\n", hfs_bmap_free() 343 pr_crit("invalid bmap found! (%u,%d)\n", hfs_bmap_free()
|
H A D | inode.c | 164 .bmap = hfs_bmap, 173 .bmap = hfs_bmap,
|
/linux-4.1.27/fs/hfsplus/ |
H A D | btree.c | 417 hfs_dbg(BNODE_MOD, "create new bmap node\n"); hfs_bmap_alloc() 460 "bmap not found!\n", hfs_bmap_free() 469 pr_crit("invalid bmap found! " hfs_bmap_free()
|
H A D | inode.c | 162 .bmap = hfsplus_bmap, 171 .bmap = hfsplus_bmap,
|
/linux-4.1.27/fs/reiserfs/ |
H A D | bitmap.c | 64 unsigned int bmap, offset; is_reusable() local 74 get_bit_address(s, block, &bmap, &offset); is_reusable() 99 if (bmap >= bmap_count) { is_reusable() 102 block, bmap); is_reusable() 116 * Searches in journal structures for a given block number (bmap, off). 120 static inline int is_block_in_journal(struct super_block *s, unsigned int bmap, is_block_in_journal() argument 125 if (reiserfs_in_journal(s, bmap, off, 1, &tmp)) { is_block_in_journal() 156 PROC_INFO_INC(s, scan_bitmap.bmap); scan_bitmap_block()
|
H A D | procfs.c | 200 " bmap" show_bitmap() 217 SFPF(bmap), show_bitmap()
|
H A D | prints.c | 771 bmap with search %d, without %d, dir2ind %d, ind2dir %d\n", print_statistics()
|
H A D | inode.c | 279 * returns 0 (being called from bmap) or read direct item into piece 361 * we are called by bmap. FIXME: we can not map block of file _get_block_create_0() 3458 .bmap = reiserfs_aop_bmap,
|
H A D | reiserfs.h | 485 stat_cnt_t bmap; member in struct:reiserfs_proc_info_data::__scan_bitmap_stats
|
/linux-4.1.27/include/uapi/linux/ |
H A D | fs.h | 157 #define FIBMAP _IO(0x00,1) /* bmap access */ 158 #define FIGETBSZ _IO(0x00,2) /* get the block size used for bmap */
|
/linux-4.1.27/fs/cachefiles/ |
H A D | rdwr.c | 413 ASSERT(inode->i_mapping->a_ops->bmap); cachefiles_read_or_alloc_page() 416 /* calculate the shift required to use bmap */ cachefiles_read_or_alloc_page() 428 * - TODO: don't use bmap() for this as it is _not_ actually good cachefiles_read_or_alloc_page() 435 block = inode->i_mapping->a_ops->bmap(inode->i_mapping, block0); cachefiles_read_or_alloc_page() 710 ASSERT(inode->i_mapping->a_ops->bmap); cachefiles_read_or_alloc_pages() 713 /* calculate the shift required to use bmap */ cachefiles_read_or_alloc_pages() 734 * - TODO: don't use bmap() for this as it is _not_ actually list_for_each_entry_safe() 741 block = inode->i_mapping->a_ops->bmap(inode->i_mapping, list_for_each_entry_safe()
|
H A D | namei.c | 650 if (!aops->bmap) cachefiles_walk_to_object()
|
/linux-4.1.27/drivers/staging/lustre/lnet/lnet/ |
H A D | lib-ptl.c | 315 __u64 *bmap; lnet_mt_test_exhausted() local 331 bmap = &mtable->mt_exhausted[pos >> LNET_MT_BITS_U64]; lnet_mt_test_exhausted() 334 return ((*bmap) & (1ULL << pos)) != 0; lnet_mt_test_exhausted() 340 __u64 *bmap; lnet_mt_set_exhausted() local 346 bmap = &mtable->mt_exhausted[pos >> LNET_MT_BITS_U64]; lnet_mt_set_exhausted() 350 *bmap &= ~(1ULL << pos); lnet_mt_set_exhausted() 352 *bmap |= 1ULL << pos; lnet_mt_set_exhausted()
|
/linux-4.1.27/fs/ecryptfs/ |
H A D | mmap.c | 549 if (lower_inode->i_mapping->a_ops->bmap) ecryptfs_bmap() 550 rc = lower_inode->i_mapping->a_ops->bmap(lower_inode->i_mapping, ecryptfs_bmap() 560 .bmap = ecryptfs_bmap,
|
/linux-4.1.27/drivers/mfd/ |
H A D | dln2.c | 84 DECLARE_BITMAP(bmap, DLN2_MAX_RX_SLOTS); 365 *slot = find_first_zero_bit(rxs->bmap, DLN2_MAX_RX_SLOTS); find_free_slot() 370 set_bit(*slot, rxs->bmap); find_free_slot() 407 clear_bit(slot, rxs->bmap); free_rx_slot()
|
/linux-4.1.27/fs/bfs/ |
H A D | file.c | 194 .bmap = bfs_bmap,
|
/linux-4.1.27/virt/kvm/arm/ |
H A D | vgic-v2-emul.c | 159 unsigned long *bmap; vgic_set_target_reg() local 176 bmap = vgic_bitmap_get_shared_map(&dist->irq_spi_target[c]); kvm_for_each_vcpu() 178 set_bit(irq + i, bmap); kvm_for_each_vcpu() 180 clear_bit(irq + i, bmap); kvm_for_each_vcpu()
|
H A D | vgic-v3-emul.c | 259 unsigned long *bmap, mpidr; handle_mmio_route_reg() local 291 bmap = vgic_bitmap_get_shared_map(&dist->irq_spi_target[vcpu_id]); handle_mmio_route_reg() 292 __clear_bit(spi, bmap); handle_mmio_route_reg() 308 bmap = vgic_bitmap_get_shared_map(&dist->irq_spi_target[vcpu_id]); handle_mmio_route_reg() 309 __set_bit(spi, bmap); handle_mmio_route_reg()
|
/linux-4.1.27/mm/ |
H A D | page_io.c | 167 first_block = bmap(inode, probe_block); generic_swapfile_activate() 183 block = bmap(inode, probe_block + block_in_page); generic_swapfile_activate()
|
/linux-4.1.27/fs/omfs/ |
H A D | file.c | 381 .bmap = omfs_bmap,
|
/linux-4.1.27/fs/efs/ |
H A D | inode.c | 26 .bmap = _efs_bmap
|
/linux-4.1.27/fs/ |
H A D | ioctl.c | 56 if (!mapping->a_ops->bmap) ioctl_fibmap() 63 res = mapping->a_ops->bmap(mapping, block); ioctl_fibmap()
|
H A D | inode.c | 1492 * bmap - find a block number in a file 1502 sector_t bmap(struct inode *inode, sector_t block) bmap() function 1505 if (inode->i_mapping->a_ops->bmap) bmap() 1506 res = inode->i_mapping->a_ops->bmap(inode->i_mapping, block); bmap() 1509 EXPORT_SYMBOL(bmap); variable
|
/linux-4.1.27/fs/qnx4/ |
H A D | inode.c | 257 .bmap = qnx4_bmap
|
/linux-4.1.27/fs/sysv/ |
H A D | itree.c | 500 .bmap = sysv_bmap
|
/linux-4.1.27/fs/isofs/ |
H A D | compress.c | 365 /* No bmap operation supported */
|
H A D | inode.c | 1136 .bmap = _isofs_bmap
|
/linux-4.1.27/fs/adfs/ |
H A D | inode.c | 82 .bmap = _adfs_bmap
|
/linux-4.1.27/fs/nfsd/ |
H A D | nfs4proc.c | 1801 u32 *bmap = op->u.getattr.ga_bmval; nfsd4_getattr_rsize() local 1802 u32 bmap0 = bmap[0], bmap1 = bmap[1], bmap2 = bmap[2]; nfsd4_getattr_rsize()
|
H A D | nfs4state.c | 919 bmap_to_share_mode(unsigned long bmap) { bmap_to_share_mode() argument 924 if (test_bit(i, &bmap)) bmap_to_share_mode()
|
/linux-4.1.27/fs/fat/ |
H A D | fat.h | 127 struct rw_semaphore truncate_lock; /* protect bmap against truncate */
|
H A D | inode.c | 307 .bmap = _fat_bmap
|
/linux-4.1.27/fs/ext3/ |
H A D | inode.c | 1493 * bmap() is special. It gets used by applications such as lilo and by 1503 * So, if we see any bmap calls here on a modified, data-journaled file, 1515 * bmap on dirty files is expected to be extremely rare: ext3_bmap() 1519 * (bmap requires CAP_SYS_RAWIO so this does not ext3_bmap() 1525 * regular files. If somebody wants to bmap a directory ext3_bmap() 1940 .bmap = ext3_bmap, 1956 .bmap = ext3_bmap, 1972 .bmap = ext3_bmap,
|
/linux-4.1.27/include/linux/ |
H A D | jbd.h | 542 * block numbers are mapped into this inode via bmap(). 690 /* bmap(). */
|
H A D | jbd2.h | 725 * block numbers are mapped into this inode via bmap(). 887 /* bmap(). */
|
H A D | fs.h | 388 sector_t (*bmap)(struct address_space *, sector_t); member in struct:address_space_operations 2409 extern sector_t bmap(struct inode *, sector_t);
|
/linux-4.1.27/fs/ntfs/ |
H A D | aops.c | 1558 * Note: This is a problem if someone tries to run bmap() on $Boot system file 1559 * as that really is in block zero but there is nothing we can do. bmap() is 1675 .bmap = ntfs_bmap,
|
/linux-4.1.27/fs/qnx6/ |
H A D | inode.c | 500 .bmap = qnx6_bmap
|
/linux-4.1.27/fs/minix/ |
H A D | inode.c | 433 .bmap = minix_bmap
|
/linux-4.1.27/fs/fuse/ |
H A D | fuse_i.h | 552 /** Is bmap not implemented by fs? */
|
H A D | file.c | 2999 .bmap = fuse_bmap,
|
/linux-4.1.27/fs/ext2/ |
H A D | inode.c | 885 .bmap = ext2_bmap, 899 .bmap = ext2_bmap,
|
/linux-4.1.27/fs/ext4/ |
H A D | inode.c | 2892 * bmap() is special. It gets used by applications such as lilo and by 2902 * So, if we see any bmap calls here on a modified, data-journaled file, 2931 * bmap on dirty files is expected to be extremely rare: ext4_bmap() 2935 * (bmap requires CAP_SYS_RAWIO so this does not ext4_bmap() 2941 * regular files. If somebody wants to bmap a directory ext4_bmap() 3300 .bmap = ext4_bmap, 3317 .bmap = ext4_bmap, 3332 .bmap = ext4_bmap,
|
H A D | extents.c | 2678 * 3 for leaf, sb, and inode plus 2 (bmap and group ext4_ext_rm_leaf() 5212 * 3 for leaf, sb, and inode plus 2 (bmap and group ext4_access_path()
|
/linux-4.1.27/fs/f2fs/ |
H A D | data.c | 1211 * get_data_block() now supported readahead/bmap/rw direct_IO with mapped bh. 1863 .bmap = f2fs_bmap,
|
/linux-4.1.27/drivers/md/ |
H A D | bitmap.c | 351 * address of each block (using bmap). These addresses will be used 380 bh->b_blocknr = bmap(inode, block); read_page() 1768 /* As future accesses to this file will use bmap, bitmap_create()
|
/linux-4.1.27/fs/udf/ |
H A D | inode.c | 21 * 11/25/98 bmap altered to better support extents 245 .bmap = udf_bmap,
|
/linux-4.1.27/fs/jbd/ |
H A D | journal.c | 678 ret = bmap(journal->j_inode, blocknr); journal_bmap() 846 * the journal. The inode must exist already, must support bmap() and
|
/linux-4.1.27/sound/usb/ |
H A D | mixer.c | 562 static int check_matrix_bitmap(unsigned char *bmap, check_matrix_bitmap() argument 566 return bmap[idx >> 3] & (0x80 >> (idx & 7)); check_matrix_bitmap()
|
/linux-4.1.27/fs/ufs/ |
H A D | inode.c | 561 .bmap = ufs_bmap
|
/linux-4.1.27/fs/befs/ |
H A D | linuxvfs.c | 80 .bmap = befs_bmap,
|
/linux-4.1.27/fs/jbd2/ |
H A D | journal.c | 791 ret = bmap(journal->j_inode, blocknr); jbd2_journal_bmap() 1196 * the journal. The inode must exist already, must support bmap() and
|
/linux-4.1.27/fs/exofs/ |
H A D | inode.c | 984 .bmap = NULL, /* TODO: use osd's OSD_ACT_READ_MAP */
|
/linux-4.1.27/fs/btrfs/ |
H A D | inode.c | 9917 * btrfs doesn't support the bmap operation because swapfiles 9918 * use bmap to make a mapping of extents in the file. They assume 9920 * use the bmap result to do IO directly to the drive. 9922 * the btrfs bmap call would return logical addresses that aren't 9926 * For now we're avoiding this by dropping bmap.
|
/linux-4.1.27/fs/ocfs2/ |
H A D | aops.c | 2441 .bmap = ocfs2_bmap,
|
H A D | suballoc.c | 2392 unsigned long *bmap)) ocfs2_block_group_clear_bits() 2385 ocfs2_block_group_clear_bits(handle_t *handle, struct inode *alloc_inode, struct ocfs2_group_desc *bg, struct buffer_head *group_bh, unsigned int bit_off, unsigned int num_bits, void (*undo_fn)(unsigned int bit, unsigned long *bmap)) ocfs2_block_group_clear_bits() argument
|
/linux-4.1.27/drivers/net/ethernet/emulex/benet/ |
H A D | be_main.c | 712 /* If vlan priority provided by OS is NOT in available bmap */ be_get_tx_vlan_tag()
|
/linux-4.1.27/drivers/net/wireless/ath/ath10k/ |
H A D | wmi.c | 2241 pvm_len = ie_len - 3; /* exclude dtim count, dtim period, bmap ctl */ ath10k_wmi_update_tim()
|