Home
last modified time | relevance | path

Searched refs:dir (Results 1 – 25 of 318) sorted by relevance

12345678910>>...13

/fs/adfs/
Ddir_f.c12 static void adfs_f_free(struct adfs_dir *dir);
72 adfs_dir_checkbyte(const struct adfs_dir *dir) in adfs_dir_checkbyte() argument
74 struct buffer_head * const *bh = dir->bh; in adfs_dir_checkbyte()
75 const int blocksize_bits = dir->sb->s_blocksize_bits; in adfs_dir_checkbyte()
128 unsigned int size, struct adfs_dir *dir) in adfs_dir_read() argument
142 dir->nr_buffers = 0; in adfs_dir_read()
143 dir->sb = sb; in adfs_dir_read()
155 dir->bh[blk] = sb_bread(sb, phys); in adfs_dir_read()
156 if (!dir->bh[blk]) in adfs_dir_read()
160 memcpy(&dir->dirhead, bufoff(dir->bh, 0), sizeof(dir->dirhead)); in adfs_dir_read()
[all …]
Ddir_fplus.c12 adfs_fplus_read(struct super_block *sb, unsigned int id, unsigned int sz, struct adfs_dir *dir) in adfs_fplus_read() argument
20 dir->nr_buffers = 0; in adfs_fplus_read()
23 dir->bh_fplus = &dir->bh[0]; in adfs_fplus_read()
31 dir->bh_fplus[0] = sb_bread(sb, block); in adfs_fplus_read()
32 if (!dir->bh_fplus[0]) in adfs_fplus_read()
34 dir->nr_buffers += 1; in adfs_fplus_read()
36 h = (struct adfs_bigdirheader *)dir->bh_fplus[0]->b_data; in adfs_fplus_read()
52 if (size > ARRAY_SIZE(dir->bh)) { in adfs_fplus_read()
64 dir->bh_fplus = bh_fplus; in adfs_fplus_read()
66 dir->bh_fplus[0] = dir->bh[0]; in adfs_fplus_read()
[all …]
Ddir.c16 void adfs_object_fixup(struct adfs_dir *dir, struct object_info *obj) in adfs_object_fixup() argument
42 if (!(obj->attr & ADFS_NDA_DIRECTORY) && ADFS_SB(dir->sb)->s_ftsuffix) { in adfs_object_fixup()
61 struct adfs_dir dir; in adfs_readdir() local
67 ret = ops->read(sb, inode->i_ino, inode->i_size, &dir); in adfs_readdir()
77 if (!dir_emit(ctx, "..", 2, dir.parent_id, DT_DIR)) in adfs_readdir()
84 ret = ops->setpos(&dir, ctx->pos - 2); in adfs_readdir()
87 while (ops->getnext(&dir, &obj) == 0) { in adfs_readdir()
98 ops->free(&dir); in adfs_readdir()
108 struct adfs_dir dir; in adfs_dir_update() local
118 ret = ops->read(sb, obj->parent_id, 0, &dir); in adfs_dir_update()
[all …]
/fs/ubifs/
Ddir.c47 static int inherit_flags(const struct inode *dir, umode_t mode) in inherit_flags() argument
50 const struct ubifs_inode *ui = ubifs_inode(dir); in inherit_flags()
52 if (!S_ISDIR(dir->i_mode)) in inherit_flags()
76 struct inode *ubifs_new_inode(struct ubifs_info *c, struct inode *dir, in ubifs_new_inode() argument
84 if (ubifs_crypt_is_encrypted(dir)) { in ubifs_new_inode()
85 err = fscrypt_get_encryption_info(dir); in ubifs_new_inode()
91 if (!fscrypt_has_encryption_key(dir)) in ubifs_new_inode()
110 inode_init_owner(inode, dir, mode); in ubifs_new_inode()
140 ui->flags = inherit_flags(dir, mode); in ubifs_new_inode()
174 err = fscrypt_inherit_context(dir, inode, &encrypted, true); in ubifs_new_inode()
[all …]
/fs/ext4/
Dnamei.c269 static unsigned dx_root_limit(struct inode *dir, unsigned infosize);
270 static unsigned dx_node_limit(struct inode *dir);
272 struct inode *dir,
276 static int dx_make_map(struct inode *dir, struct ext4_dir_entry_2 *de,
285 static int ext4_htree_next_block(struct inode *dir, __u32 hash,
289 static struct buffer_head * ext4_dx_find_entry(struct inode *dir,
293 struct inode *dir, struct inode *inode);
572 static inline unsigned dx_root_limit(struct inode *dir, unsigned infosize) in dx_root_limit() argument
574 unsigned entry_space = dir->i_sb->s_blocksize - EXT4_DIR_REC_LEN(1) - in dx_root_limit()
577 if (ext4_has_metadata_csum(dir->i_sb)) in dx_root_limit()
[all …]
/fs/hpfs/
Dnamei.c12 static void hpfs_update_directory_times(struct inode *dir) in hpfs_update_directory_times() argument
14 time64_t t = local_to_gmt(dir->i_sb, local_get_seconds(dir->i_sb)); in hpfs_update_directory_times()
15 if (t == dir->i_mtime.tv_sec && in hpfs_update_directory_times()
16 t == dir->i_ctime.tv_sec) in hpfs_update_directory_times()
18 dir->i_mtime.tv_sec = dir->i_ctime.tv_sec = t; in hpfs_update_directory_times()
19 dir->i_mtime.tv_nsec = dir->i_ctime.tv_nsec = 0; in hpfs_update_directory_times()
20 hpfs_write_inode_nolock(dir); in hpfs_update_directory_times()
23 static int hpfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode) in hpfs_mkdir() argument
39 hpfs_lock(dir->i_sb); in hpfs_mkdir()
41 fnode = hpfs_alloc_fnode(dir->i_sb, hpfs_i(dir)->i_dno, &fno, &bh); in hpfs_mkdir()
[all …]
/fs/reiserfs/
Dnamei.c304 static int reiserfs_find_entry(struct inode *dir, const char *name, int namelen, in reiserfs_find_entry() argument
311 if (namelen > REISERFS_MAX_NAME(dir->i_sb->s_blocksize)) in reiserfs_find_entry()
315 make_cpu_key(&key_to_search, dir, in reiserfs_find_entry()
316 get_third_component(dir->i_sb, name, namelen), in reiserfs_find_entry()
321 search_by_entry_key(dir->i_sb, &key_to_search, in reiserfs_find_entry()
324 reiserfs_error(dir->i_sb, "zam-7001", "io error"); in reiserfs_find_entry()
352 static struct dentry *reiserfs_lookup(struct inode *dir, struct dentry *dentry, in reiserfs_lookup() argument
360 if (REISERFS_MAX_NAME(dir->i_sb->s_blocksize) < dentry->d_name.len) in reiserfs_lookup()
363 reiserfs_write_lock(dir->i_sb); in reiserfs_lookup()
367 reiserfs_find_entry(dir, dentry->d_name.name, dentry->d_name.len, in reiserfs_lookup()
[all …]
/fs/ocfs2/
Ddir.c60 struct inode *dir,
71 static int ocfs2_supports_dir_trailer(struct inode *dir) in ocfs2_supports_dir_trailer() argument
73 struct ocfs2_super *osb = OCFS2_SB(dir->i_sb); in ocfs2_supports_dir_trailer()
75 if (OCFS2_I(dir)->ip_dyn_features & OCFS2_INLINE_DATA_FL) in ocfs2_supports_dir_trailer()
78 return ocfs2_meta_ecc(osb) || ocfs2_dir_indexed(dir); in ocfs2_supports_dir_trailer()
89 static int ocfs2_new_dir_wants_trailer(struct inode *dir) in ocfs2_new_dir_wants_trailer() argument
91 struct ocfs2_super *osb = OCFS2_SB(dir->i_sb); in ocfs2_new_dir_wants_trailer()
119 static int ocfs2_skip_dir_trailer(struct inode *dir, in ocfs2_skip_dir_trailer() argument
126 if (!ocfs2_supports_dir_trailer(dir)) in ocfs2_skip_dir_trailer()
153 static int ocfs2_dx_dir_link_trailer(struct inode *dir, handle_t *handle, in ocfs2_dx_dir_link_trailer() argument
[all …]
/fs/f2fs/
Ddir.c85 static struct f2fs_dir_entry *find_in_block(struct inode *dir, in find_in_block() argument
98 make_dentry_ptr_block(dir, &d, dentry_blk); in find_in_block()
142 static void f2fs_fname_setup_ci_filename(struct inode *dir, in f2fs_fname_setup_ci_filename() argument
146 struct f2fs_sb_info *sbi = F2FS_I_SB(dir); in f2fs_fname_setup_ci_filename()
148 if (!IS_CASEFOLDED(dir)) { in f2fs_fname_setup_ci_filename()
253 static struct f2fs_dir_entry *find_in_level(struct inode *dir, in find_in_level() argument
266 f2fs_hash_t namehash = f2fs_dentry_hash(dir, &name, fname); in find_in_level()
268 nbucket = dir_buckets(level, F2FS_I(dir)->i_dir_level); in find_in_level()
271 bidx = dir_block_index(level, F2FS_I(dir)->i_dir_level, in find_in_level()
277 dentry_page = f2fs_find_data_page(dir, bidx); in find_in_level()
[all …]
Dinline.c325 struct f2fs_dir_entry *f2fs_find_in_inline_dir(struct inode *dir, in f2fs_find_in_inline_dir() argument
328 struct f2fs_sb_info *sbi = F2FS_SB(dir->i_sb); in f2fs_find_in_inline_dir()
336 ipage = f2fs_get_node_page(sbi, dir->i_ino); in f2fs_find_in_inline_dir()
342 namehash = f2fs_dentry_hash(dir, &name, fname); in f2fs_find_in_inline_dir()
344 inline_dentry = inline_data_addr(dir, ipage); in f2fs_find_in_inline_dir()
346 make_dentry_ptr_inline(dir, &d, inline_dentry); in f2fs_find_in_inline_dir()
380 static int f2fs_move_inline_dirents(struct inode *dir, struct page *ipage, in f2fs_move_inline_dirents() argument
389 page = f2fs_grab_cache_page(dir->i_mapping, 0, false); in f2fs_move_inline_dirents()
395 set_new_dnode(&dn, dir, ipage, NULL, 0); in f2fs_move_inline_dirents()
404 __func__, dir->i_ino, dn.data_blkaddr); in f2fs_move_inline_dirents()
[all …]
Dnamei.c25 static struct inode *f2fs_new_inode(struct inode *dir, umode_t mode) in f2fs_new_inode() argument
27 struct f2fs_sb_info *sbi = F2FS_I_SB(dir); in f2fs_new_inode()
34 inode = new_inode(dir->i_sb); in f2fs_new_inode()
48 inode_init_owner(inode, dir, mode); in f2fs_new_inode()
66 (F2FS_I(dir)->i_flags & F2FS_PROJINHERIT_FL)) in f2fs_new_inode()
67 F2FS_I(inode)->i_projid = F2FS_I(dir)->i_projid; in f2fs_new_inode()
79 if ((IS_ENCRYPTED(dir) || DUMMY_ENCRYPTION_ENABLED(sbi)) && in f2fs_new_inode()
114 f2fs_mask_flags(mode, F2FS_I(dir)->i_flags & F2FS_FL_INHERITED); in f2fs_new_inode()
265 static int f2fs_create(struct inode *dir, struct dentry *dentry, umode_t mode, in f2fs_create() argument
268 struct f2fs_sb_info *sbi = F2FS_I_SB(dir); in f2fs_create()
[all …]
/fs/bfs/
Ddir.c24 static int bfs_add_entry(struct inode *dir, const struct qstr *child, int ino);
25 static struct buffer_head *bfs_find_entry(struct inode *dir,
31 struct inode *dir = file_inode(f); in bfs_readdir() local
40 dir->i_sb->s_id, dir->i_ino); in bfs_readdir()
44 while (ctx->pos < dir->i_size) { in bfs_readdir()
46 block = BFS_I(dir)->i_sblock + (ctx->pos >> BFS_BSIZE_BITS); in bfs_readdir()
47 bh = sb_bread(dir->i_sb, block); in bfs_readdir()
65 } while ((offset < BFS_BSIZE) && (ctx->pos < dir->i_size)); in bfs_readdir()
78 static int bfs_create(struct inode *dir, struct dentry *dentry, umode_t mode, in bfs_create() argument
83 struct super_block *s = dir->i_sb; in bfs_create()
[all …]
/fs/cachefiles/
Dnamei.c289 struct dentry *dir, in cachefiles_bury_object() argument
299 _enter(",'%pd','%pd'", dir, rep); in cachefiles_bury_object()
301 _debug("remove %p from %p", rep, dir); in cachefiles_bury_object()
308 path.dentry = dir; in cachefiles_bury_object()
314 ret = vfs_unlink(d_inode(dir), rep, NULL); in cachefiles_bury_object()
320 inode_unlock(d_inode(dir)); in cachefiles_bury_object()
331 inode_unlock(d_inode(dir)); in cachefiles_bury_object()
340 trap = lock_rename(cache->graveyard, dir); in cachefiles_bury_object()
343 if (rep->d_parent != dir || IS_DEADDIR(d_inode(rep))) { in cachefiles_bury_object()
346 unlock_rename(cache->graveyard, dir); in cachefiles_bury_object()
[all …]
/fs/nilfs2/
Dnamei.c54 nilfs_lookup(struct inode *dir, struct dentry *dentry, unsigned int flags) in nilfs_lookup() argument
62 ino = nilfs_inode_by_name(dir, &dentry->d_name); in nilfs_lookup()
63 inode = ino ? nilfs_iget(dir->i_sb, NILFS_I(dir)->i_root, ino) : NULL; in nilfs_lookup()
75 static int nilfs_create(struct inode *dir, struct dentry *dentry, umode_t mode, in nilfs_create() argument
82 err = nilfs_transaction_begin(dir->i_sb, &ti, 1); in nilfs_create()
85 inode = nilfs_new_inode(dir, mode); in nilfs_create()
95 err = nilfs_transaction_commit(dir->i_sb); in nilfs_create()
97 nilfs_transaction_abort(dir->i_sb); in nilfs_create()
103 nilfs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, dev_t rdev) in nilfs_mknod() argument
109 err = nilfs_transaction_begin(dir->i_sb, &ti, 1); in nilfs_mknod()
[all …]
Ddir.c99 struct inode *dir = mapping->host; in nilfs_commit_chunk() local
107 if (pos + copied > dir->i_size) in nilfs_commit_chunk()
108 i_size_write(dir, pos + copied); in nilfs_commit_chunk()
109 if (IS_DIRSYNC(dir)) in nilfs_commit_chunk()
111 err = nilfs_set_file_dirty(dir, nr_dirty); in nilfs_commit_chunk()
118 struct inode *dir = page->mapping->host; in nilfs_check_page() local
119 struct super_block *sb = dir->i_sb; in nilfs_check_page()
120 unsigned int chunk_size = nilfs_chunk_size(dir); in nilfs_check_page()
127 if ((dir->i_size >> PAGE_SHIFT) == page->index) { in nilfs_check_page()
128 limit = dir->i_size & ~PAGE_MASK; in nilfs_check_page()
[all …]
/fs/udf/
Dnamei.c160 static struct fileIdentDesc *udf_find_entry(struct inode *dir, in udf_find_entry() argument
178 struct udf_inode_info *dinfo = UDF_I(dir); in udf_find_entry()
181 struct super_block *sb = dir->i_sb; in udf_find_entry()
183 size = udf_ext0_offset(dir) + dir->i_size; in udf_find_entry()
184 f_pos = udf_ext0_offset(dir); in udf_find_entry()
189 if (inode_bmap(dir, f_pos >> sb->s_blocksize_bits, &epos, in udf_find_entry()
218 fi = udf_fileident_read(dir, &f_pos, fibh, cfi, &epos, &eloc, in udf_find_entry()
296 static struct dentry *udf_lookup(struct inode *dir, struct dentry *dentry, in udf_lookup() argument
307 fi = udf_find_entry(dir, &dentry->d_name, &fibh, &cfi); in udf_lookup()
319 inode = udf_iget(dir->i_sb, &loc); in udf_lookup()
[all …]
/fs/nfs/
Ddir.c71 static struct nfs_open_dir_context *alloc_nfs_open_dir_context(struct inode *dir, const struct cred… in alloc_nfs_open_dir_context() argument
73 struct nfs_inode *nfsi = NFS_I(dir); in alloc_nfs_open_dir_context()
82 spin_lock(&dir->i_lock); in alloc_nfs_open_dir_context()
88 spin_unlock(&dir->i_lock); in alloc_nfs_open_dir_context()
94 static void put_nfs_open_dir_context(struct inode *dir, struct nfs_open_dir_context *ctx) in put_nfs_open_dir_context() argument
96 spin_lock(&dir->i_lock); in put_nfs_open_dir_context()
98 spin_unlock(&dir->i_lock); in put_nfs_open_dir_context()
400 bool nfs_use_readdirplus(struct inode *dir, struct dir_context *ctx) in nfs_use_readdirplus() argument
402 if (!nfs_server_capable(dir, NFS_CAP_READDIRPLUS)) in nfs_use_readdirplus()
404 if (test_and_clear_bit(NFS_INO_ADVISE_RDPLUS, &NFS_I(dir)->flags)) in nfs_use_readdirplus()
[all …]
Dnfstrace.h239 const struct inode *dir,
244 TP_ARGS(dir, dentry, flags),
249 __field(u64, dir)
254 __entry->dev = dir->i_sb->s_dev;
255 __entry->dir = NFS_FILEID(dir);
265 (unsigned long long)__entry->dir,
273 const struct inode *dir, \
277 TP_ARGS(dir, dentry, flags))
281 const struct inode *dir,
287 TP_ARGS(dir, dentry, flags, error),
[all …]
/fs/omfs/
Ddir.c24 static struct buffer_head *omfs_get_bucket(struct inode *dir, in omfs_get_bucket() argument
27 int nbuckets = (dir->i_size - OMFS_DIR_START)/8; in omfs_get_bucket()
31 return omfs_bread(dir->i_sb, dir->i_ino); in omfs_get_bucket()
34 static struct buffer_head *omfs_scan_list(struct inode *dir, u64 block, in omfs_scan_list() argument
44 bh = omfs_bread(dir->i_sb, block); in omfs_scan_list()
51 if (omfs_is_bad(OMFS_SB(dir->i_sb), &oi->i_head, block)) { in omfs_scan_list()
67 static struct buffer_head *omfs_find_entry(struct inode *dir, in omfs_find_entry() argument
74 bh = omfs_get_bucket(dir, name, namelen, &ofs); in omfs_find_entry()
81 return omfs_scan_list(dir, block, name, namelen, &dummy); in omfs_find_entry()
113 struct inode *dir = d_inode(dentry->d_parent); in omfs_add_link() local
[all …]
/fs/ufs/
Ddir.c48 struct inode *dir = mapping->host; in ufs_commit_chunk() local
51 inode_inc_iversion(dir); in ufs_commit_chunk()
53 if (pos+len > dir->i_size) { in ufs_commit_chunk()
54 i_size_write(dir, pos+len); in ufs_commit_chunk()
55 mark_inode_dirty(dir); in ufs_commit_chunk()
57 if (IS_DIRSYNC(dir)) in ufs_commit_chunk()
70 ino_t ufs_inode_by_name(struct inode *dir, const struct qstr *qstr) in ufs_inode_by_name() argument
76 de = ufs_find_entry(dir, qstr, &page); in ufs_inode_by_name()
78 res = fs32_to_cpu(dir->i_sb, de->d_ino); in ufs_inode_by_name()
86 void ufs_set_link(struct inode *dir, struct ufs_dir_entry *de, in ufs_set_link() argument
[all …]
/fs/ext2/
Ddir.c93 struct inode *dir = mapping->host; in ext2_commit_chunk() local
96 inode_inc_iversion(dir); in ext2_commit_chunk()
99 if (pos+len > dir->i_size) { in ext2_commit_chunk()
100 i_size_write(dir, pos+len); in ext2_commit_chunk()
101 mark_inode_dirty(dir); in ext2_commit_chunk()
104 if (IS_DIRSYNC(dir)) { in ext2_commit_chunk()
107 err = sync_inode_metadata(dir, 1); in ext2_commit_chunk()
117 struct inode *dir = page->mapping->host; in ext2_check_page() local
118 struct super_block *sb = dir->i_sb; in ext2_check_page()
119 unsigned chunk_size = ext2_chunk_size(dir); in ext2_check_page()
[all …]
Dnamei.c56 static struct dentry *ext2_lookup(struct inode * dir, struct dentry *dentry, unsigned int flags) in ext2_lookup() argument
64 ino = ext2_inode_by_name(dir, &dentry->d_name); in ext2_lookup()
67 inode = ext2_iget(dir->i_sb, ino); in ext2_lookup()
69 ext2_error(dir->i_sb, __func__, in ext2_lookup()
95 static int ext2_create (struct inode * dir, struct dentry * dentry, umode_t mode, bool excl) in ext2_create() argument
100 err = dquot_initialize(dir); in ext2_create()
104 inode = ext2_new_inode(dir, mode, &dentry->d_name); in ext2_create()
113 static int ext2_tmpfile(struct inode *dir, struct dentry *dentry, umode_t mode) in ext2_tmpfile() argument
115 struct inode *inode = ext2_new_inode(dir, mode, NULL); in ext2_tmpfile()
126 static int ext2_mknod (struct inode * dir, struct dentry *dentry, umode_t mode, dev_t rdev) in ext2_mknod() argument
[all …]
/fs/affs/
Damigaffs.c26 affs_insert_hash(struct inode *dir, struct buffer_head *bh) in affs_insert_hash() argument
28 struct super_block *sb = dir->i_sb; in affs_insert_hash()
36 pr_debug("%s(dir=%lu, ino=%d)\n", __func__, dir->i_ino, ino); in affs_insert_hash()
38 dir_bh = affs_bread(sb, dir->i_ino); in affs_insert_hash()
50 AFFS_TAIL(sb, bh)->parent = cpu_to_be32(dir->i_ino); in affs_insert_hash()
54 if (dir->i_ino == dir_bh->b_blocknr) in affs_insert_hash()
60 mark_buffer_dirty_inode(dir_bh, dir); in affs_insert_hash()
63 dir->i_mtime = dir->i_ctime = current_time(dir); in affs_insert_hash()
64 inode_inc_iversion(dir); in affs_insert_hash()
65 mark_inode_dirty(dir); in affs_insert_hash()
[all …]
/fs/coda/
Ddir.c41 static struct dentry *coda_lookup(struct inode *dir, struct dentry *entry, unsigned int flags) in coda_lookup() argument
43 struct super_block *sb = dir->i_sb; in coda_lookup()
51 coda_i2s(dir), length); in coda_lookup()
56 if (is_root_inode(dir) && coda_iscontrol(name, length)) { in coda_lookup()
61 int error = venus_lookup(sb, coda_i2f(dir), name, length, in coda_lookup()
103 static inline void coda_dir_update_mtime(struct inode *dir) in coda_dir_update_mtime() argument
108 coda_flag_inode(dir, C_VATTR); in coda_dir_update_mtime()
113 dir->i_mtime = dir->i_ctime = current_time(dir); in coda_dir_update_mtime()
122 static inline void coda_dir_inc_nlink(struct inode *dir) in coda_dir_inc_nlink() argument
124 if (dir->i_nlink >= 2) in coda_dir_inc_nlink()
[all …]
/fs/minix/
Dnamei.c22 static struct dentry *minix_lookup(struct inode * dir, struct dentry *dentry, unsigned int flags) in minix_lookup() argument
27 if (dentry->d_name.len > minix_sb(dir->i_sb)->s_namelen) in minix_lookup()
32 inode = minix_iget(dir->i_sb, ino); in minix_lookup()
36 static int minix_mknod(struct inode * dir, struct dentry *dentry, umode_t mode, dev_t rdev) in minix_mknod() argument
44 inode = minix_new_inode(dir, mode, &error); in minix_mknod()
54 static int minix_tmpfile(struct inode *dir, struct dentry *dentry, umode_t mode) in minix_tmpfile() argument
57 struct inode *inode = minix_new_inode(dir, mode, &error); in minix_tmpfile()
66 static int minix_create(struct inode *dir, struct dentry *dentry, umode_t mode, in minix_create() argument
69 return minix_mknod(dir, dentry, mode, 0); in minix_create()
72 static int minix_symlink(struct inode * dir, struct dentry *dentry, in minix_symlink() argument
[all …]

12345678910>>...13