Home
last modified time | relevance | path

Searched refs:nr (Results 1 – 25 of 110) sorted by relevance

12345

/fs/erofs/
Dzpvec.h34 unsigned int nr, index; member
51 unsigned int nr) in z_erofs_pagevec_ctor_next_page() argument
59 for (index = 0; index < nr; ++index) { in z_erofs_pagevec_ctor_next_page()
66 DBG_BUGON(nr >= ctor->nr); in z_erofs_pagevec_ctor_next_page()
74 struct page *next = z_erofs_pagevec_ctor_next_page(ctor, ctor->nr); in z_erofs_pagevec_ctor_pagedown()
83 ctor->nr = PAGE_SIZE / sizeof(struct page *); in z_erofs_pagevec_ctor_pagedown()
88 unsigned int nr, in z_erofs_pagevec_ctor_init() argument
92 ctor->nr = nr; in z_erofs_pagevec_ctor_init()
96 if (i >= nr) { in z_erofs_pagevec_ctor_init()
97 i -= nr; in z_erofs_pagevec_ctor_init()
[all …]
/fs/minix/
Dminix.h108 #define minix_test_and_set_bit(nr, addr) \ argument
109 __test_and_set_bit((nr), (unsigned long *)(addr))
110 #define minix_set_bit(nr, addr) \ argument
111 __set_bit((nr), (unsigned long *)(addr))
112 #define minix_test_and_clear_bit(nr, addr) \ argument
113 __test_and_clear_bit((nr), (unsigned long *)(addr))
114 #define minix_test_bit(nr, addr) \ argument
115 test_bit((nr), (unsigned long *)(addr))
143 #define minix_test_and_set_bit(nr, addr) \ argument
144 __test_and_set_bit((nr) ^ 16, (unsigned long *)(addr))
[all …]
Ditree_common.c83 int nr = minix_new_block(inode); in alloc_branch() local
84 if (!nr) in alloc_branch()
86 branch[n].key = cpu_to_block(nr); in alloc_branch()
96 parent = nr; in alloc_branch()
259 unsigned long nr; in free_data() local
262 nr = block_to_cpu(*p); in free_data()
263 if (nr) { in free_data()
265 minix_free_block(inode, nr); in free_data()
273 unsigned long nr; in free_branches() local
277 nr = block_to_cpu(*p); in free_branches()
[all …]
/fs/ext4/
Dindirect.c907 ext4_fsblk_t nr; /* Current block # */ in ext4_free_data() local
922 nr = le32_to_cpu(*p); in ext4_free_data()
923 if (nr) { in ext4_free_data()
926 block_to_free = nr; in ext4_free_data()
929 } else if (nr == block_to_free + count) { in ext4_free_data()
937 block_to_free = nr; in ext4_free_data()
987 ext4_fsblk_t nr; in ext4_free_branches() local
998 nr = le32_to_cpu(*p); in ext4_free_branches()
999 if (!nr) in ext4_free_branches()
1003 nr, 1)) { in ext4_free_branches()
[all …]
/fs/ocfs2/
Dblockcheck.c99 u32 ocfs2_hamming_encode(u32 parity, void *data, unsigned int d, unsigned int nr) in ocfs2_hamming_encode() argument
120 b = calc_code_bit(nr + i, &p); in ocfs2_hamming_encode()
158 void ocfs2_hamming_fix(void *data, unsigned int d, unsigned int nr, in ocfs2_hamming_fix() argument
176 if (fix >= calc_code_bit(nr + d, NULL)) in ocfs2_hamming_fix()
184 b = calc_code_bit(nr, NULL); in ocfs2_hamming_fix()
443 void ocfs2_block_check_compute_bhs(struct buffer_head **bhs, int nr, in ocfs2_block_check_compute_bhs() argument
449 BUG_ON(nr < 0); in ocfs2_block_check_compute_bhs()
451 if (!nr) in ocfs2_block_check_compute_bhs()
456 for (i = 0, crc = ~0, ecc = 0; i < nr; i++) { in ocfs2_block_check_compute_bhs()
487 int ocfs2_block_check_validate_bhs(struct buffer_head **bhs, int nr, in ocfs2_block_check_validate_bhs() argument
[all …]
Dbuffer_head_io.c92 unsigned int nr, struct buffer_head *bhs[]) in ocfs2_read_blocks_sync() argument
99 trace_ocfs2_read_blocks_sync((unsigned long long)block, nr); in ocfs2_read_blocks_sync()
101 if (!nr) in ocfs2_read_blocks_sync()
109 for (i = 0 ; i < nr ; i++) { in ocfs2_read_blocks_sync()
156 for (i = nr; i > 0; i--) { in ocfs2_read_blocks_sync()
195 int ocfs2_read_blocks(struct ocfs2_caching_info *ci, u64 block, int nr, in ocfs2_read_blocks() argument
206 trace_ocfs2_read_blocks_begin(ci, (unsigned long long)block, nr, flags); in ocfs2_read_blocks()
218 if (nr < 0) { in ocfs2_read_blocks()
219 mlog(ML_ERROR, "asked to read %d blocks!\n", nr); in ocfs2_read_blocks()
225 if (nr == 0) { in ocfs2_read_blocks()
[all …]
Dblockcheck.h37 struct buffer_head **bhs, int nr,
40 struct buffer_head **bhs, int nr,
49 void ocfs2_block_check_compute_bhs(struct buffer_head **bhs, int nr,
51 int ocfs2_block_check_validate_bhs(struct buffer_head **bhs, int nr,
78 unsigned int nr);
89 void ocfs2_hamming_fix(void *data, unsigned int d, unsigned int nr,
/fs/ubifs/
Dshrinker.c58 static int shrink_tnc(struct ubifs_info *c, int nr, int age, int *contention) in shrink_tnc() argument
81 while (znode && total_freed < nr && in shrink_tnc()
144 static int shrink_tnc_trees(int nr, int age, int *contention) in shrink_tnc_trees() argument
187 freed += shrink_tnc(c, nr, age, contention); in shrink_tnc_trees()
198 if (freed >= nr) in shrink_tnc_trees()
282 unsigned long nr = sc->nr_to_scan; in ubifs_shrink_scan() local
299 freed = shrink_tnc_trees(nr, OLD_ZNODE_AGE, &contention); in ubifs_shrink_scan()
300 if (freed >= nr) in ubifs_shrink_scan()
304 freed += shrink_tnc_trees(nr - freed, YOUNG_ZNODE_AGE, &contention); in ubifs_shrink_scan()
305 if (freed >= nr) in ubifs_shrink_scan()
[all …]
/fs/
Dcoredump.c341 int nr = 0; in zap_process() local
353 nr++; in zap_process()
357 return nr; in zap_process()
365 int nr = -EAGAIN; in zap_threads() local
371 nr = zap_process(tsk, exit_code, 0); in zap_threads()
375 if (unlikely(nr < 0)) in zap_threads()
376 return nr; in zap_threads()
379 if (atomic_read(&mm->mm_users) == nr + 1) in zap_threads()
423 nr += zap_process(p, exit_code, in zap_threads()
432 atomic_set(&core_state->nr_threads, nr); in zap_threads()
[all …]
Daio.c60 unsigned nr; /* number of io_events */ member
84 unsigned nr; member
337 for (i = 0; i < table->nr; i++) { in aio_ring_mremap()
544 ring->nr = nr_events; /* user copy */ in aio_setup_ring()
644 for (i = 0; i < table->nr; i++) in ioctx_add_table()
660 new_nr = (table ? table->nr : 1) * 4; in ioctx_add_table()
668 table->nr = new_nr; in ioctx_add_table()
675 } else if (table->nr > old->nr) { in ioctx_add_table()
677 old->nr * sizeof(struct kioctx *)); in ioctx_add_table()
688 static void aio_nr_sub(unsigned nr) in aio_nr_sub() argument
[all …]
Dfile.c41 #define BITBIT_NR(nr) BITS_TO_LONGS(BITS_TO_LONGS(nr)) argument
42 #define BITBIT_SIZE(nr) (BITBIT_NR(nr) * sizeof(long)) argument
85 static struct fdtable * alloc_fdtable(unsigned int nr) in alloc_fdtable() argument
97 nr /= (1024 / sizeof(struct file *)); in alloc_fdtable()
98 nr = roundup_pow_of_two(nr + 1); in alloc_fdtable()
99 nr *= (1024 / sizeof(struct file *)); in alloc_fdtable()
108 if (unlikely(nr > sysctl_nr_open)) in alloc_fdtable()
109 nr = ((sysctl_nr_open - 1) | (BITS_PER_LONG - 1)) + 1; in alloc_fdtable()
114 fdt->max_fds = nr; in alloc_fdtable()
115 data = kvmalloc_array(nr, sizeof(struct file *), GFP_KERNEL_ACCOUNT); in alloc_fdtable()
[all …]
Dselect.c382 #define FDS_LONGS(nr) (((nr)+FDS_BITPERLONG-1)/FDS_BITPERLONG) argument
383 #define FDS_BYTES(nr) (FDS_LONGS(nr)*sizeof(long)) argument
389 int get_fd_set(unsigned long nr, void __user *ufdset, unsigned long *fdset) in get_fd_set() argument
391 nr = FDS_BYTES(nr); in get_fd_set()
393 return copy_from_user(fdset, ufdset, nr) ? -EFAULT : 0; in get_fd_set()
395 memset(fdset, 0, nr); in get_fd_set()
400 set_fd_set(unsigned long nr, void __user *ufdset, unsigned long *fdset) in set_fd_set() argument
403 return __copy_to_user(ufdset, fdset, FDS_BYTES(nr)); in set_fd_set()
408 void zero_fd_set(unsigned long nr, unsigned long *fdset) in zero_fd_set() argument
410 memset(fdset, 0, FDS_BYTES(nr)); in zero_fd_set()
[all …]
/fs/sysv/
Ditree.c54 static inline int block_to_cpu(struct sysv_sb_info *sbi, sysv_zone_t nr) in block_to_cpu() argument
56 return sbi->s_block_base + fs32_to_cpu(sbi, nr); in block_to_cpu()
329 sysv_zone_t nr = *p; in free_data() local
330 if (nr) { in free_data()
332 sysv_free_block(inode->i_sb, nr); in free_data()
346 sysv_zone_t nr = *p; in free_branches() local
347 if (!nr) in free_branches()
350 block = block_to_cpu(SYSV_SB(sb), nr); in free_branches()
357 sysv_free_block(sb, nr); in free_branches()
370 sysv_zone_t nr = 0; in sysv_truncate() local
[all …]
Dballoc.c43 void sysv_free_block(struct super_block * sb, sysv_zone_t nr) in sysv_free_block() argument
49 unsigned block = fs32_to_cpu(sbi, nr); in sysv_free_block()
92 sbi->s_bcache[count++] = nr; in sysv_free_block()
104 sysv_zone_t nr; in sysv_new_block() local
113 nr = sbi->s_bcache[--count]; in sysv_new_block()
114 if (nr == 0) /* Applies only to Xenix FS, SystemV FS */ in sysv_new_block()
117 block = fs32_to_cpu(sbi, nr); in sysv_new_block()
152 return nr; in sysv_new_block()
/fs/f2fs/
Dshrinker.c78 unsigned long nr = sc->nr_to_scan; in f2fs_shrink_scan() local
105 freed += f2fs_shrink_extent_tree(sbi, nr >> 1); in f2fs_shrink_scan()
108 if (freed < nr) in f2fs_shrink_scan()
109 freed += f2fs_try_to_free_nats(sbi, nr - freed); in f2fs_shrink_scan()
112 if (freed < nr) in f2fs_shrink_scan()
113 freed += f2fs_try_to_free_nids(sbi, nr - freed); in f2fs_shrink_scan()
119 if (freed >= nr) in f2fs_shrink_scan()
/fs/hpfs/
Dalloc.c120 unsigned nr = (near & 0x3fff) & ~(n - 1); in alloc_in_bmp() local
134 if (!tstbits(bmp, nr, n + forward)) { in alloc_in_bmp()
135 ret = bs + nr; in alloc_in_bmp()
138 q = nr + n; b = 0; in alloc_in_bmp()
143 if (q>>5 != nr>>5) { in alloc_in_bmp()
145 q = nr & 0x1f; in alloc_in_bmp()
147 } else if (q > nr) break; in alloc_in_bmp()
153 nr >>= 5; in alloc_in_bmp()
155 i = nr; in alloc_in_bmp()
178 } while (i != nr); in alloc_in_bmp()
[all …]
/fs/reiserfs/
Dlbalance.c315 int nr, free_space; in leaf_copy_items_entirely() local
338 nr = blkh_nr_item(blkh); in leaf_copy_items_entirely()
345 dest_before = (last_first == LAST_TO_FIRST) ? 0 : nr; in leaf_copy_items_entirely()
355 memmove(ih + cpy_num, ih, (nr - dest_before) * IH_SIZE); in leaf_copy_items_entirely()
365 for (i = dest_before; i < nr + cpy_num; i++) { in leaf_copy_items_entirely()
371 last_loc = ih_location(&ih[nr + cpy_num - 1 - dest_before]); in leaf_copy_items_entirely()
389 set_blkh_nr_item(blkh, nr + cpy_num); in leaf_copy_items_entirely()
907 int nr, free_space; in leaf_insert_into_buf() local
915 nr = blkh_nr_item(blkh); in leaf_insert_into_buf()
930 last_loc = nr ? ih_location(&ih[nr - before - 1]) : bh->b_size; in leaf_insert_into_buf()
[all …]
Dibalance.c133 int nr; in internal_insert_childs() local
143 nr = blkh_nr_item(blkh); in internal_insert_childs()
153 memmove(dc + count, dc, (nr + 1 - (to + 1)) * DC_SIZE); in internal_insert_childs()
167 (nr - to) * KEY_SIZE + (nr + 1 + count) * DC_SIZE); in internal_insert_childs()
210 int nr; in internal_delete_pointers_items() local
228 nr = blkh_nr_item(blkh); in internal_delete_pointers_items()
230 if (first_p == 0 && del_num == nr + 1) { in internal_delete_pointers_items()
245 memmove(dc, dc + del_num, (nr + 1 - first_p - del_num) * DC_SIZE); in internal_delete_pointers_items()
248 (nr - first_i - del_num) * KEY_SIZE + (nr + 1 - in internal_delete_pointers_items()
435 int nr; in internal_insert_key() local
[all …]
/fs/afs/
Daddr_list.c28 struct afs_addr_list *afs_alloc_addrlist(unsigned int nr, in afs_alloc_addrlist() argument
35 _enter("%u,%u,%u", nr, service, port); in afs_alloc_addrlist()
37 if (nr > AFS_MAX_ADDRESSES) in afs_alloc_addrlist()
38 nr = AFS_MAX_ADDRESSES; in afs_alloc_addrlist()
40 alist = kzalloc(struct_size(alist, addrs, nr), GFP_KERNEL); in afs_alloc_addrlist()
45 alist->max_addrs = nr; in afs_alloc_addrlist()
47 for (i = 0; i < nr; i++) { in afs_alloc_addrlist()
73 unsigned int nr = 0; in afs_parse_text_addrs() local
95 nr++; in afs_parse_text_addrs()
118 _debug("%u/%u addresses", nr, AFS_MAX_ADDRESSES); in afs_parse_text_addrs()
[all …]
/fs/fat/
Dcache.c232 int nr; in fat_get_cluster() local
262 nr = -EIO; in fat_get_cluster()
266 nr = fat_ent_read(inode, &fatent, *dclus); in fat_get_cluster()
267 if (nr < 0) in fat_get_cluster()
269 else if (nr == FAT_ENT_FREE) { in fat_get_cluster()
273 nr = -EIO; in fat_get_cluster()
275 } else if (nr == FAT_ENT_EOF) { in fat_get_cluster()
280 *dclus = nr; in fat_get_cluster()
284 nr = 0; in fat_get_cluster()
288 return nr; in fat_get_cluster()
/fs/btrfs/
Dprint-tree.c170 u32 type, nr; in btrfs_print_leaf() local
187 nr = btrfs_header_nritems(l); in btrfs_print_leaf()
191 btrfs_header_bytenr(l), btrfs_header_generation(l), nr, in btrfs_print_leaf()
194 for (i = 0 ; i < nr ; i++) { in btrfs_print_leaf()
327 int i; u32 nr; in btrfs_print_tree() local
334 nr = btrfs_header_nritems(c); in btrfs_print_tree()
343 nr, (u32)BTRFS_NODEPTRS_PER_BLOCK(fs_info) - nr, in btrfs_print_tree()
346 for (i = 0; i < nr; i++) { in btrfs_print_tree()
355 for (i = 0; i < nr; i++) { in btrfs_print_tree()
Dctree.h1496 int nr) in btrfs_stripe_nr() argument
1500 offset += nr * sizeof(struct btrfs_stripe); in btrfs_stripe_nr()
1504 static inline char *btrfs_stripe_dev_uuid_nr(struct btrfs_chunk *c, int nr) in btrfs_stripe_dev_uuid_nr() argument
1506 return btrfs_stripe_dev_uuid(btrfs_stripe_nr(c, nr)); in btrfs_stripe_dev_uuid_nr()
1510 struct btrfs_chunk *c, int nr) in btrfs_stripe_offset_nr() argument
1512 return btrfs_stripe_offset(eb, btrfs_stripe_nr(c, nr)); in btrfs_stripe_offset_nr()
1516 struct btrfs_chunk *c, int nr) in btrfs_stripe_devid_nr() argument
1518 return btrfs_stripe_devid(eb, btrfs_stripe_nr(c, nr)); in btrfs_stripe_devid_nr()
1671 static inline u64 btrfs_node_blockptr(struct extent_buffer *eb, int nr) in btrfs_node_blockptr() argument
1675 sizeof(struct btrfs_key_ptr) * nr; in btrfs_node_blockptr()
[all …]
/fs/xfs/scrub/
Drefcount.c156 xfs_nlink_t nr; in xchk_refcountbt_process_rmap_fragments() local
173 nr = 1; in xchk_refcountbt_process_rmap_fragments()
194 if (nr == target_nr) in xchk_refcountbt_process_rmap_fragments()
196 nr++; in xchk_refcountbt_process_rmap_fragments()
203 if (nr != target_nr) in xchk_refcountbt_process_rmap_fragments()
208 nr = 0; in xchk_refcountbt_process_rmap_fragments()
219 nr++; in xchk_refcountbt_process_rmap_fragments()
230 nr--; in xchk_refcountbt_process_rmap_fragments()
231 if (nr == 0) in xchk_refcountbt_process_rmap_fragments()
241 if (nr) in xchk_refcountbt_process_rmap_fragments()
/fs/ext2/
Dinode.c1110 unsigned long nr; in ext2_free_data() local
1113 nr = le32_to_cpu(*p); in ext2_free_data()
1114 if (nr) { in ext2_free_data()
1119 else if (block_to_free == nr - count) in ext2_free_data()
1125 block_to_free = nr; in ext2_free_data()
1150 unsigned long nr; in ext2_free_branches() local
1155 nr = le32_to_cpu(*p); in ext2_free_branches()
1156 if (!nr) in ext2_free_branches()
1159 bh = sb_bread(inode->i_sb, nr); in ext2_free_branches()
1167 inode->i_ino, nr); in ext2_free_branches()
[all …]
/fs/jffs2/
Dmalloc.c202 struct jffs2_eraseblock *jeb, int nr) in jffs2_prealloc_raw_node_refs() argument
205 int i = nr; in jffs2_prealloc_raw_node_refs()
207 dbg_memalloc("%d\n", nr); in jffs2_prealloc_raw_node_refs()
212 dbg_memalloc("Reserving %d refs for block @0x%08x\n", nr, jeb->offset); in jffs2_prealloc_raw_node_refs()
233 jeb->allocated_refs = nr; in jffs2_prealloc_raw_node_refs()
236 nr, jeb->offset, jeb->last_node, jeb->last_node->flash_offset, in jffs2_prealloc_raw_node_refs()

12345