Home
last modified time | relevance | path

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

1234

/fs/ocfs2/
Dblockcheck.c104 u32 ocfs2_hamming_encode(u32 parity, void *data, unsigned int d, unsigned int nr) in ocfs2_hamming_encode() argument
125 b = calc_code_bit(nr + i, &p); in ocfs2_hamming_encode()
163 void ocfs2_hamming_fix(void *data, unsigned int d, unsigned int nr, in ocfs2_hamming_fix() argument
181 if (fix >= calc_code_bit(nr + d, NULL)) in ocfs2_hamming_fix()
189 b = calc_code_bit(nr, NULL); in ocfs2_hamming_fix()
324 void ocfs2_block_check_compute_bhs(struct buffer_head **bhs, int nr, in ocfs2_block_check_compute_bhs() argument
330 BUG_ON(nr < 0); in ocfs2_block_check_compute_bhs()
332 if (!nr) in ocfs2_block_check_compute_bhs()
337 for (i = 0, crc = ~0, ecc = 0; i < nr; i++) { in ocfs2_block_check_compute_bhs()
368 int ocfs2_block_check_validate_bhs(struct buffer_head **bhs, int nr, in ocfs2_block_check_validate_bhs() argument
[all …]
Dblockcheck.h30 struct buffer_head **bhs, int nr,
33 struct buffer_head **bhs, int nr,
41 void ocfs2_block_check_compute_bhs(struct buffer_head **bhs, int nr,
43 int ocfs2_block_check_validate_bhs(struct buffer_head **bhs, int nr,
64 unsigned int nr);
75 void ocfs2_hamming_fix(void *data, unsigned int d, unsigned int nr,
Dbuffer_head_io.c104 unsigned int nr, struct buffer_head *bhs[]) in ocfs2_read_blocks_sync() argument
110 if (!nr) { in ocfs2_read_blocks_sync()
115 for (i = 0 ; i < nr ; i++) { in ocfs2_read_blocks_sync()
159 for (i = nr; i > 0; i--) { in ocfs2_read_blocks_sync()
180 int ocfs2_read_blocks(struct inode *inode, u64 block, int nr, in ocfs2_read_blocks() argument
190 inode, (unsigned long long)block, nr, flags); in ocfs2_read_blocks()
202 if (nr < 0) { in ocfs2_read_blocks()
203 mlog(ML_ERROR, "asked to read %d blocks!\n", nr); in ocfs2_read_blocks()
209 if (nr == 0) { in ocfs2_read_blocks()
216 for (i = 0 ; i < nr ; i++) { in ocfs2_read_blocks()
[all …]
Dbuffer_head_io.h38 unsigned int nr, struct buffer_head *bhs[]);
47 int ocfs2_read_blocks(struct inode *inode, u64 block, int nr,
/fs/ubifs/
Dshrinker.c70 static int shrink_tnc(struct ubifs_info *c, int nr, int age, int *contention) in shrink_tnc() argument
93 while (znode && total_freed < nr && in shrink_tnc()
157 static int shrink_tnc_trees(int nr, int age, int *contention) in shrink_tnc_trees() argument
200 freed += shrink_tnc(c, nr, age, contention); in shrink_tnc_trees()
212 if (freed >= nr) in shrink_tnc_trees()
282 int ubifs_shrinker(int nr, gfp_t gfp_mask) in ubifs_shrinker() argument
287 if (nr == 0) in ubifs_shrinker()
302 freed = shrink_tnc_trees(nr, OLD_ZNODE_AGE, &contention); in ubifs_shrinker()
303 if (freed >= nr) in ubifs_shrinker()
307 freed += shrink_tnc_trees(nr - freed, YOUNG_ZNODE_AGE, &contention); in ubifs_shrinker()
[all …]
/fs/minix/
Ditree_common.c82 int nr = minix_new_block(inode); in alloc_branch() local
83 if (!nr) in alloc_branch()
85 branch[n].key = cpu_to_block(nr); in alloc_branch()
95 parent = nr; in alloc_branch()
258 unsigned long nr; in free_data() local
261 nr = block_to_cpu(*p); in free_data()
262 if (nr) { in free_data()
264 minix_free_block(inode, nr); in free_data()
272 unsigned long nr; in free_branches() local
276 nr = block_to_cpu(*p); in free_branches()
[all …]
/fs/
Dfile.c139 static struct fdtable * alloc_fdtable(unsigned int nr) in alloc_fdtable() argument
151 nr /= (1024 / sizeof(struct file *)); in alloc_fdtable()
152 nr = roundup_pow_of_two(nr + 1); in alloc_fdtable()
153 nr *= (1024 / sizeof(struct file *)); in alloc_fdtable()
162 if (unlikely(nr > sysctl_nr_open)) in alloc_fdtable()
163 nr = ((sysctl_nr_open - 1) | (BITS_PER_LONG - 1)) + 1; in alloc_fdtable()
168 fdt->max_fds = nr; in alloc_fdtable()
169 data = alloc_fdmem(nr * sizeof(struct file *)); in alloc_fdtable()
174 2 * nr / BITS_PER_BYTE, L1_CACHE_BYTES)); in alloc_fdtable()
178 data += nr / BITS_PER_BYTE; in alloc_fdtable()
[all …]
Daio.c99 info->nr = 0; in aio_free_ring()
122 info->nr = 0; in aio_setup_ring()
156 info->nr = nr_events; /* trusted copy */ in aio_setup_ring()
159 ring->nr = nr_events; /* user copy */ in aio_setup_ring()
179 #define aio_ring_event(info, nr, km) ({ \ argument
180 unsigned pos = (nr) + AIO_EVENTS_OFFSET; \
302 ctx, ctx->user_id, current->mm, ctx->ring_info.nr); in ioctx_alloc()
999 if (++tail >= info->nr) in aio_complete()
1067 (unsigned long)ring->nr); in aio_read_evt()
1074 head = ring->head % info->nr; in aio_read_evt()
[all …]
Dcompat.c533 unsigned long nr, in compat_sys_io_getevents() argument
543 nr * sizeof(struct io_event)))) in compat_sys_io_getevents()
553 ret = sys_io_getevents(ctx_id, min_nr, nr, events, ut); in compat_sys_io_getevents()
559 copy_iocb(long nr, u32 __user *ptr32, struct iocb __user * __user *ptr64) in copy_iocb() argument
564 for (i = 0; i < nr; ++i) { in copy_iocb()
576 compat_sys_io_submit(aio_context_t ctx_id, int nr, u32 __user *iocb) in compat_sys_io_submit() argument
581 if (unlikely(nr < 0)) in compat_sys_io_submit()
584 if (nr > MAX_AIO_SUBMITS) in compat_sys_io_submit()
585 nr = MAX_AIO_SUBMITS; in compat_sys_io_submit()
587 iocb64 = compat_alloc_user_space(nr * sizeof(*iocb64)); in compat_sys_io_submit()
[all …]
Dbinfmt_elf_fdpic.c478 int nr; /* reset for each csp adjustment */ in create_elf_fdpic_tables() local
580 __put_user((id), &ent[nr]._id); \ in create_elf_fdpic_tables()
581 __put_user((val), &ent[nr]._val); \ in create_elf_fdpic_tables()
582 nr++; \ in create_elf_fdpic_tables()
585 nr = 0; in create_elf_fdpic_tables()
589 nr = 0; in create_elf_fdpic_tables()
596 nr = 0; in create_elf_fdpic_tables()
603 nr = 0; in create_elf_fdpic_tables()
608 nr = 0; in create_elf_fdpic_tables()
627 nr = 0; in create_elf_fdpic_tables()
[all …]
/fs/hpfs/
Dalloc.c69 unsigned nr = (near & 0x3fff) & ~(n - 1); in alloc_in_bmp() local
84 if (!tstbits(bmp, nr, n + forward)) { in alloc_in_bmp()
85 ret = bs + nr; in alloc_in_bmp()
92 q = nr + n; b = 0; in alloc_in_bmp()
97 if (q>>5 != nr>>5) { in alloc_in_bmp()
99 q = nr & 0x1f; in alloc_in_bmp()
101 } else if (q > nr) break; in alloc_in_bmp()
107 nr >>= 5; in alloc_in_bmp()
109 i = nr; in alloc_in_bmp()
132 } while (i != nr); in alloc_in_bmp()
[all …]
/fs/sysv/
Ditree.c53 static inline int block_to_cpu(struct sysv_sb_info *sbi, sysv_zone_t nr) in block_to_cpu() argument
55 return sbi->s_block_base + fs32_to_cpu(sbi, nr); in block_to_cpu()
328 sysv_zone_t nr = *p; in free_data() local
329 if (nr) { in free_data()
331 sysv_free_block(inode->i_sb, nr); in free_data()
345 sysv_zone_t nr = *p; in free_branches() local
346 if (!nr) in free_branches()
349 block = block_to_cpu(SYSV_SB(sb), nr); in free_branches()
356 sysv_free_block(sb, nr); in free_branches()
369 sysv_zone_t nr = 0; in sysv_truncate() local
[all …]
Dballoc.c42 void sysv_free_block(struct super_block * sb, sysv_zone_t nr) in sysv_free_block() argument
48 unsigned block = fs32_to_cpu(sbi, nr); in sysv_free_block()
91 sbi->s_bcache[count++] = nr; in sysv_free_block()
103 sysv_zone_t nr; in sysv_new_block() local
112 nr = sbi->s_bcache[--count]; in sysv_new_block()
113 if (nr == 0) /* Applies only to Xenix FS, SystemV FS */ in sysv_new_block()
116 block = fs32_to_cpu(sbi, nr); in sysv_new_block()
151 return nr; in sysv_new_block()
/fs/btrfs/
Dprint-tree.c51 u32 nr = btrfs_header_nritems(l); in btrfs_print_leaf() local
66 (unsigned long long)btrfs_header_bytenr(l), nr, in btrfs_print_leaf()
68 for (i = 0 ; i < nr ; i++) { in btrfs_print_leaf()
177 int i; u32 nr; in btrfs_print_tree() local
183 nr = btrfs_header_nritems(c); in btrfs_print_tree()
191 btrfs_header_level(c), nr, in btrfs_print_tree()
192 (u32)BTRFS_NODEPTRS_PER_BLOCK(root) - nr); in btrfs_print_tree()
193 for (i = 0; i < nr; i++) { in btrfs_print_tree()
202 for (i = 0; i < nr; i++) { in btrfs_print_tree()
Dctree.h1121 int nr) in btrfs_stripe_nr() argument
1125 offset += nr * sizeof(struct btrfs_stripe); in btrfs_stripe_nr()
1129 static inline char *btrfs_stripe_dev_uuid_nr(struct btrfs_chunk *c, int nr) in btrfs_stripe_dev_uuid_nr() argument
1131 return btrfs_stripe_dev_uuid(btrfs_stripe_nr(c, nr)); in btrfs_stripe_dev_uuid_nr()
1135 struct btrfs_chunk *c, int nr) in btrfs_stripe_offset_nr() argument
1137 return btrfs_stripe_offset(eb, btrfs_stripe_nr(c, nr)); in btrfs_stripe_offset_nr()
1141 struct btrfs_chunk *c, int nr, in btrfs_set_stripe_offset_nr() argument
1144 btrfs_set_stripe_offset(eb, btrfs_stripe_nr(c, nr), val); in btrfs_set_stripe_offset_nr()
1148 struct btrfs_chunk *c, int nr) in btrfs_stripe_devid_nr() argument
1150 return btrfs_stripe_devid(eb, btrfs_stripe_nr(c, nr)); in btrfs_stripe_devid_nr()
[all …]
Dctree.c648 u32 nr = btrfs_header_nritems(leaf); in leaf_data_end() local
649 if (nr == 0) in leaf_data_end()
651 return btrfs_item_offset_nr(leaf, nr - 1); in leaf_data_end()
1277 u32 nr; in reada_for_search() local
1300 nr = slot; in reada_for_search()
1303 if (nr == 0) in reada_for_search()
1305 nr--; in reada_for_search()
1307 nr++; in reada_for_search()
1308 if (nr >= nritems) in reada_for_search()
1312 btrfs_node_key(node, &disk_key, nr); in reada_for_search()
[all …]
/fs/reiserfs/
Dlbalance.c287 int nr, free_space; in leaf_copy_items_entirely() local
310 nr = blkh_nr_item(blkh); in leaf_copy_items_entirely()
314 dest_before = (last_first == LAST_TO_FIRST) ? 0 : nr; in leaf_copy_items_entirely()
324 memmove(ih + cpy_num, ih, (nr - dest_before) * IH_SIZE); in leaf_copy_items_entirely()
334 for (i = dest_before; i < nr + cpy_num; i++) { in leaf_copy_items_entirely()
340 last_loc = ih_location(&(ih[nr + cpy_num - 1 - dest_before])); in leaf_copy_items_entirely()
357 set_blkh_nr_item(blkh, nr + cpy_num); in leaf_copy_items_entirely()
801 int nr, free_space; in leaf_insert_into_buf() local
809 nr = blkh_nr_item(blkh); in leaf_insert_into_buf()
824 last_loc = nr ? ih_location(&(ih[nr - before - 1])) : bh->b_size; in leaf_insert_into_buf()
[all …]
Dibalance.c125 int nr; in internal_insert_childs() local
135 nr = blkh_nr_item(blkh); in internal_insert_childs()
145 memmove(dc + count, dc, (nr + 1 - (to + 1)) * DC_SIZE); in internal_insert_childs()
159 (nr - to) * KEY_SIZE + (nr + 1 + count) * DC_SIZE); in internal_insert_childs()
200 int nr; in internal_delete_pointers_items() local
218 nr = blkh_nr_item(blkh); in internal_delete_pointers_items()
220 if (first_p == 0 && del_num == nr + 1) { in internal_delete_pointers_items()
235 memmove(dc, dc + del_num, (nr + 1 - first_p - del_num) * DC_SIZE); in internal_delete_pointers_items()
238 (nr - first_i - del_num) * KEY_SIZE + (nr + 1 - in internal_delete_pointers_items()
411 int nr; in internal_insert_key() local
[all …]
Dprints.c428 int i, nr; in print_leaf() local
438 nr = blkh_nr_item(blkh); in print_leaf()
446 &(ih->ih_key), &((ih + nr - 1)->ih_key)); in print_leaf()
450 if (first < 0 || first > nr - 1) in print_leaf()
455 if (last < 0 || last > nr) in print_leaf()
456 to = nr; in print_leaf()
679 int nr; in check_leaf_block_head() local
682 nr = blkh_nr_item(blkh); in check_leaf_block_head()
683 if (nr > (bh->b_size - BLKH_SIZE) / IH_SIZE) in check_leaf_block_head()
687 if (blkh_free_space(blkh) > bh->b_size - BLKH_SIZE - IH_SIZE * nr) in check_leaf_block_head()
/fs/fat/
Dcache.c223 int nr; in fat_get_cluster() local
247 nr = -EIO; in fat_get_cluster()
251 nr = fat_ent_read(inode, &fatent, *dclus); in fat_get_cluster()
252 if (nr < 0) in fat_get_cluster()
254 else if (nr == FAT_ENT_FREE) { in fat_get_cluster()
258 nr = -EIO; in fat_get_cluster()
260 } else if (nr == FAT_ENT_EOF) { in fat_get_cluster()
265 *dclus = nr; in fat_get_cluster()
269 nr = 0; in fat_get_cluster()
273 return nr; in fat_get_cluster()
/fs/ext2/
Dinode.c931 unsigned long nr; in ext2_free_data() local
934 nr = le32_to_cpu(*p); in ext2_free_data()
935 if (nr) { in ext2_free_data()
940 else if (block_to_free == nr - count) in ext2_free_data()
946 block_to_free = nr; in ext2_free_data()
971 unsigned long nr; in ext2_free_branches() local
976 nr = le32_to_cpu(*p); in ext2_free_branches()
977 if (!nr) in ext2_free_branches()
980 bh = sb_bread(inode->i_sb, nr); in ext2_free_branches()
988 inode->i_ino, nr); in ext2_free_branches()
[all …]
/fs/jffs2/
Dmalloc.c209 struct jffs2_eraseblock *jeb, int nr) in jffs2_prealloc_raw_node_refs() argument
212 int i = nr; in jffs2_prealloc_raw_node_refs()
214 dbg_memalloc("%d\n", nr); in jffs2_prealloc_raw_node_refs()
219 dbg_memalloc("Reserving %d refs for block @0x%08x\n", nr, jeb->offset); in jffs2_prealloc_raw_node_refs()
240 jeb->allocated_refs = nr; in jffs2_prealloc_raw_node_refs()
243 nr, jeb->offset, jeb->last_node, jeb->last_node->flash_offset, in jffs2_prealloc_raw_node_refs()
/fs/autofs/
Droot.c49 off_t onr, nr; in autofs_root_readdir() local
55 nr = filp->f_pos; in autofs_root_readdir()
57 switch(nr) in autofs_root_readdir()
60 if (filldir(dirent, ".", 1, nr, inode->i_ino, DT_DIR) < 0) in autofs_root_readdir()
62 filp->f_pos = ++nr; in autofs_root_readdir()
65 if (filldir(dirent, "..", 2, nr, inode->i_ino, DT_DIR) < 0) in autofs_root_readdir()
67 filp->f_pos = ++nr; in autofs_root_readdir()
70 while (onr = nr, ent = autofs_hash_enum(dirhash,&nr,ent)) { in autofs_root_readdir()
74 filp->f_pos = nr; in autofs_root_readdir()
/fs/ext3/
Dinode.c2067 u32 nr = le32_to_cpu(*p); in ext3_clear_blocks() local
2068 if (nr) { in ext3_clear_blocks()
2072 bh = sb_find_get_block(inode->i_sb, nr); in ext3_clear_blocks()
2073 ext3_forget(handle, 0, inode, bh, nr); in ext3_clear_blocks()
2108 ext3_fsblk_t nr; /* Current block # */ in ext3_free_data() local
2123 nr = le32_to_cpu(*p); in ext3_free_data()
2124 if (nr) { in ext3_free_data()
2127 block_to_free = nr; in ext3_free_data()
2130 } else if (nr == block_to_free + count) { in ext3_free_data()
2136 block_to_free = nr; in ext3_free_data()
[all …]
/fs/ramfs/
Dfile-nommu.c245 unsigned long maxpages, lpages, nr, loop, ret; in ramfs_nommu_get_unmapped_area() local
271 nr = find_get_pages(inode->i_mapping, pgoff, lpages, pages); in ramfs_nommu_get_unmapped_area()
272 if (nr != lpages) in ramfs_nommu_get_unmapped_area()
288 for (loop = nr; loop > 0; loop--) in ramfs_nommu_get_unmapped_area()

1234