Home
last modified time | relevance | path

Searched refs:ofs (Results 1 – 25 of 48) sorted by relevance

12

/fs/overlayfs/
Dsuper.c227 static void ovl_free_fs(struct ovl_fs *ofs) in ovl_free_fs() argument
232 iput(ofs->workbasedir_trap); in ovl_free_fs()
233 iput(ofs->indexdir_trap); in ovl_free_fs()
234 iput(ofs->workdir_trap); in ovl_free_fs()
235 dput(ofs->whiteout); in ovl_free_fs()
236 dput(ofs->indexdir); in ovl_free_fs()
237 dput(ofs->workdir); in ovl_free_fs()
238 if (ofs->workdir_locked) in ovl_free_fs()
239 ovl_inuse_unlock(ofs->workbasedir); in ovl_free_fs()
240 dput(ofs->workbasedir); in ovl_free_fs()
[all …]
Dnamei.c33 struct ovl_fs *ofs = OVL_FS(d->sb); in ovl_check_redirect() local
35 buf = ovl_get_redirect_xattr(ofs, dentry, prelen + strlen(post)); in ovl_check_redirect()
108 static struct ovl_fh *ovl_get_fh(struct ovl_fs *ofs, struct dentry *dentry, in ovl_get_fh() argument
114 res = ovl_do_getxattr(ofs, dentry, ox, NULL, 0); in ovl_get_fh()
128 res = ovl_do_getxattr(ofs, dentry, ox, fh->buf, res); in ovl_get_fh()
153 struct dentry *ovl_decode_real_fh(struct ovl_fs *ofs, struct ovl_fh *fh, in ovl_decode_real_fh() argument
167 if (ofs->config.uuid ? !uuid_equal(&fh->fb.uuid, &mnt->mnt_sb->s_uuid) : in ovl_decode_real_fh()
347 int ovl_check_origin_fh(struct ovl_fs *ofs, struct ovl_fh *fh, bool connected, in ovl_check_origin_fh() argument
353 for (i = 1; i < ofs->numlayer; i++) { in ovl_check_origin_fh()
358 if (ofs->layers[i].fsid && in ovl_check_origin_fh()
[all …]
Dutil.c21 struct ovl_fs *ofs = dentry->d_sb->s_fs_info; in ovl_want_write() local
22 return mnt_want_write(ovl_upper_mnt(ofs)); in ovl_want_write()
27 struct ovl_fs *ofs = dentry->d_sb->s_fs_info; in ovl_drop_write() local
28 mnt_drop_write(ovl_upper_mnt(ofs)); in ovl_drop_write()
33 struct ovl_fs *ofs = dentry->d_sb->s_fs_info; in ovl_workdir() local
34 return ofs->workdir; in ovl_workdir()
39 struct ovl_fs *ofs = sb->s_fs_info; in ovl_override_creds() local
41 if (!ofs->config.override_creds) in ovl_override_creds()
43 return override_creds(ofs->creator_cred); in ovl_override_creds()
74 struct ovl_fs *ofs = sb->s_fs_info; in ovl_indexdir() local
[all …]
Doverlayfs.h120 static inline const char *ovl_xattr(struct ovl_fs *ofs, enum ovl_xattr ox) in ovl_xattr() argument
122 return ovl_xattr_table[ox][ofs->config.userxattr]; in ovl_xattr()
185 static inline ssize_t ovl_do_getxattr(struct ovl_fs *ofs, struct dentry *dentry, in ovl_do_getxattr() argument
189 const char *name = ovl_xattr(ofs, ox); in ovl_do_getxattr()
198 static inline int ovl_do_setxattr(struct ovl_fs *ofs, struct dentry *dentry, in ovl_do_setxattr() argument
202 const char *name = ovl_xattr(ofs, ox); in ovl_do_setxattr()
209 static inline int ovl_do_removexattr(struct ovl_fs *ofs, struct dentry *dentry, in ovl_do_removexattr() argument
212 const char *name = ovl_xattr(ofs, ox); in ovl_do_removexattr()
266 static inline bool ovl_allow_offline_changes(struct ovl_fs *ofs) in ovl_allow_offline_changes() argument
273 return (!ofs->config.index && !ofs->config.metacopy && in ovl_allow_offline_changes()
[all …]
Dexport.c185 struct ovl_fs *ofs = dentry->d_sb->s_fs_info; in ovl_check_encode_origin() local
207 if (d_is_dir(dentry) && ovl_upper_mnt(ofs)) in ovl_check_encode_origin()
214 static int ovl_dentry_to_fid(struct ovl_fs *ofs, struct dentry *dentry, in ovl_dentry_to_fid() argument
230 fh = ovl_encode_real_fh(ofs, enc_lower ? ovl_dentry_lower(dentry) : in ovl_dentry_to_fid()
253 struct ovl_fs *ofs = OVL_FS(inode->i_sb); in ovl_encode_fh() local
265 bytes = ovl_dentry_to_fid(ofs, dentry, fid, buflen); in ovl_encode_fh()
431 struct ovl_fs *ofs = sb->s_fs_info; in ovl_lookup_real_inode() local
452 if (!this && layer->idx && ofs->indexdir && !WARN_ON(!d_is_dir(real))) { in ovl_lookup_real_inode()
453 index = ovl_lookup_index(ofs, NULL, real, false); in ovl_lookup_real_inode()
460 struct dentry *upper = ovl_index_upper(ofs, index); in ovl_lookup_real_inode()
[all …]
Dcopy_up.c196 static int ovl_copy_up_data(struct ovl_fs *ofs, struct path *old, in ovl_copy_up_data() argument
287 if (!error && ovl_should_sync(ofs)) in ovl_copy_up_data()
342 struct ovl_fh *ovl_encode_real_fh(struct ovl_fs *ofs, struct dentry *real, in ovl_encode_real_fh() argument
387 if (ofs->config.uuid) in ovl_encode_real_fh()
397 int ovl_set_origin(struct ovl_fs *ofs, struct dentry *lower, in ovl_set_origin() argument
409 fh = ovl_encode_real_fh(ofs, lower, false); in ovl_set_origin()
417 err = ovl_check_setxattr(ofs, upper, OVL_XATTR_ORIGIN, fh->buf, in ovl_set_origin()
426 static int ovl_set_upper_fh(struct ovl_fs *ofs, struct dentry *upper, in ovl_set_upper_fh() argument
432 fh = ovl_encode_real_fh(ofs, upper, true); in ovl_set_upper_fh()
436 err = ovl_do_setxattr(ofs, index, OVL_XATTR_UPPER, fh->buf, fh->fb.len); in ovl_set_upper_fh()
[all …]
Ddir.c65 static struct dentry *ovl_whiteout(struct ovl_fs *ofs) in ovl_whiteout() argument
69 struct dentry *workdir = ofs->workdir; in ovl_whiteout()
72 if (!ofs->whiteout) { in ovl_whiteout()
83 ofs->whiteout = whiteout; in ovl_whiteout()
86 if (ofs->share_whiteout) { in ovl_whiteout()
91 err = ovl_do_link(ofs->whiteout, wdir, whiteout); in ovl_whiteout()
97 ofs->whiteout->d_inode->i_nlink, err); in ovl_whiteout()
98 ofs->share_whiteout = false; in ovl_whiteout()
102 whiteout = ofs->whiteout; in ovl_whiteout()
103 ofs->whiteout = NULL; in ovl_whiteout()
[all …]
/fs/jffs2/
Dscan.c47 struct jffs2_raw_inode *ri, uint32_t ofs, struct jffs2_summary *s);
49 struct jffs2_raw_dirent *rd, uint32_t ofs, struct jffs2_summary *s);
291 uint32_t ofs, uint32_t len) in jffs2_fill_scan_buf() argument
296 ret = jffs2_flash_read(c, ofs, len, &retlen, buf); in jffs2_fill_scan_buf()
299 len, ofs, ret); in jffs2_fill_scan_buf()
304 ofs, retlen); in jffs2_fill_scan_buf()
331 struct jffs2_raw_xattr *rx, uint32_t ofs, in jffs2_scan_xattr_node() argument
341 ofs, je32_to_cpu(rx->node_crc), crc); in jffs2_scan_xattr_node()
354 ofs, je32_to_cpu(rx->totlen), totlen); in jffs2_scan_xattr_node()
366 = jffs2_link_node_ref(c, jeb, ofs | REF_PRISTINE, totlen, NULL); in jffs2_scan_xattr_node()
[all …]
Dnodelist.c66 if (frag && frag->ofs != size) { in jffs2_truncate_fragtree()
67 if (frag->ofs+frag->size > size) { in jffs2_truncate_fragtree()
68 frag->size = size - frag->ofs; in jffs2_truncate_fragtree()
72 while (frag && frag->ofs >= size) { in jffs2_truncate_fragtree()
88 if (frag->ofs + frag->size < size) in jffs2_truncate_fragtree()
89 return frag->ofs + frag->size; in jffs2_truncate_fragtree()
93 if (frag->node && (frag->ofs & (PAGE_SIZE - 1)) == 0) { in jffs2_truncate_fragtree()
95 frag->ofs, frag->ofs + frag->size); in jffs2_truncate_fragtree()
109 ref_offset(this->node->raw), this->node->ofs, this->node->ofs+this->node->size); in jffs2_obsolete_node_frag()
114 …ref_offset(this->node->raw), this->node->ofs, this->node->ofs+this->node->size, this->node->frags); in jffs2_obsolete_node_frag()
[all …]
Dread.c25 int ofs, int len) in jffs2_read_dnode() argument
71 D1(if(ofs + len > je32_to_cpu(ri->dsize)) { in jffs2_read_dnode()
73 len, ofs, je32_to_cpu(ri->dsize)); in jffs2_read_dnode()
143 memcpy(buf, decomprbuf+ofs, len); in jffs2_read_dnode()
177 if (unlikely(!frag || frag->ofs > offset || in jffs2_read_inode_range()
178 frag->ofs + frag->size <= offset)) { in jffs2_read_inode_range()
180 if (frag && frag->ofs > offset) { in jffs2_read_inode_range()
182 f->inocache->ino, frag->ofs, offset); in jffs2_read_inode_range()
183 holesize = min(holesize, frag->ofs - offset); in jffs2_read_inode_range()
192 uint32_t holeend = min(end, frag->ofs + frag->size); in jffs2_read_inode_range()
[all …]
Dreadinode.c37 uint32_t crc, ofs, len; in check_node_data() local
43 ofs = ref_offset(ref) + sizeof(struct jffs2_raw_inode); in check_node_data()
47 int adj = ofs % c->wbuf_pagesize; in check_node_data()
53 ref_offset(ref), tn->csize, ofs); in check_node_data()
57 ofs += adj; in check_node_data()
62 ref_offset(ref), tn->csize, tn->partial_crc, tn->data_crc, ofs - len, ofs, len); in check_node_data()
67 err = mtd_point(c->mtd, ofs, len, &retlen, (void **)&buffer, NULL); in check_node_data()
70 mtd_unpoint(c->mtd, ofs, retlen); in check_node_data()
85 err = jffs2_flash_read(c, ofs, len, &retlen, buffer); in check_node_data()
87 JFFS2_ERROR("can not read %d bytes from 0x%08x, error code: %d.\n", len, ofs, err); in check_node_data()
[all …]
Dcompr_rubin.c33 unsigned int ofs; member
48 unsigned buflen, unsigned ofs, in init_pushpull() argument
53 pp->ofs = ofs; in init_pushpull()
59 if (pp->ofs >= pp->buflen - (use_reserved?0:pp->reserve)) in pushbit()
63 pp->buf[pp->ofs >> 3] |= (1<<(7-(pp->ofs & 7))); in pushbit()
65 pp->buf[pp->ofs >> 3] &= ~(1<<(7-(pp->ofs & 7))); in pushbit()
67 pp->ofs++; in pushbit()
74 return pp->ofs; in pushedbits()
81 bit = (pp->buf[pp->ofs >> 3] >> (7-(pp->ofs & 7))) & 1; in pullbit()
83 pp->ofs++; in pullbit()
Dgc.c537 end = frag->ofs + frag->size; in jffs2_garbage_collect_live()
539 start = frag->ofs; in jffs2_garbage_collect_live()
808 ilen = last_frag->ofs + last_frag->size; in jffs2_garbage_collect_metadata()
1087 ilen = frag->ofs + frag->size; in jffs2_garbage_collect_hole()
1139 for (frag = jffs2_lookup_node_frag(&f->fragtree, fn->ofs); in jffs2_garbage_collect_hole()
1141 if (frag->ofs > fn->size + fn->ofs) in jffs2_garbage_collect_hole()
1203 BUG_ON(frag->ofs != start); in jffs2_garbage_collect_dnode()
1206 while((frag = frag_prev(frag)) && frag->ofs >= min) { in jffs2_garbage_collect_dnode()
1210 if (frag->ofs > min) { in jffs2_garbage_collect_dnode()
1212 frag->ofs, frag->ofs+frag->size); in jffs2_garbage_collect_dnode()
[all …]
Dwbuf.c231 uint32_t ofs) in jffs2_verify_write() argument
237 ret = mtd_read(c->mtd, ofs, c->wbuf_pagesize, &retlen, c->wbuf_verify); in jffs2_verify_write()
244 __func__, ofs, retlen, c->wbuf_pagesize); in jffs2_verify_write()
283 uint32_t start, end, ofs, len; in jffs2_wbuf_recover() local
406 ofs = write_ofs(c); in jffs2_wbuf_recover()
418 towrite, ofs); in jffs2_wbuf_recover()
423 pr_notice("Faking write error at 0x%08x\n", ofs); in jffs2_wbuf_recover()
425 mtd_write(c->mtd, ofs, towrite, &retlen, brokenbuf); in jffs2_wbuf_recover()
429 ret = mtd_write(c->mtd, ofs, towrite, &retlen, in jffs2_wbuf_recover()
432 if (ret || retlen != towrite || jffs2_verify_write(c, rewrite_buf, ofs)) { in jffs2_wbuf_recover()
[all …]
Dsummary.c116 uint32_t ofs) in jffs2_sum_add_inode_mem() argument
126 temp->offset = cpu_to_je32(ofs); /* relative offset from the beginning of the jeb */ in jffs2_sum_add_inode_mem()
134 uint32_t ofs) in jffs2_sum_add_dirent_mem() argument
144 temp->offset = cpu_to_je32(ofs); /* relative from the beginning of the jeb */ in jffs2_sum_add_dirent_mem()
158 int jffs2_sum_add_xattr_mem(struct jffs2_summary *s, struct jffs2_raw_xattr *rx, uint32_t ofs) in jffs2_sum_add_xattr_mem() argument
169 temp->offset = cpu_to_je32(ofs); in jffs2_sum_add_xattr_mem()
176 int jffs2_sum_add_xref_mem(struct jffs2_summary *s, struct jffs2_raw_xref *rr, uint32_t ofs) in jffs2_sum_add_xref_mem() argument
185 temp->offset = cpu_to_je32(ofs); in jffs2_sum_add_xref_mem()
249 unsigned long count, uint32_t ofs) in jffs2_sum_add_kvec() argument
260 jeb = &c->blocks[ofs / c->sector_size]; in jffs2_sum_add_kvec()
[all …]
Ddebug.h193 uint32_t ofs, int len);
217 __jffs2_dbg_dump_node(struct jffs2_sb_info *c, uint32_t ofs);
228 #define jffs2_dbg_prewrite_paranoia_check(c, ofs, len) \ argument
229 __jffs2_dbg_prewrite_paranoia_check(c, ofs, len)
235 #define jffs2_dbg_prewrite_paranoia_check(c, ofs, len) argument
253 #define jffs2_dbg_dump_node(c, ofs) \ argument
254 __jffs2_dbg_dump_node(c, ofs);
263 #define jffs2_dbg_dump_node(c, ofs) argument
Ddebug.c98 if (frag->ofs & (PAGE_SIZE-1) && frag_prev(frag) in __jffs2_dbg_fragtree_paranoia_check_nolock()
105 if ((frag->ofs+frag->size) & (PAGE_SIZE-1) && frag_next(frag) in __jffs2_dbg_fragtree_paranoia_check_nolock()
108 ref_offset(fn->raw), frag->ofs, frag->ofs+frag->size); in __jffs2_dbg_fragtree_paranoia_check_nolock()
126 uint32_t ofs, int len) in __jffs2_dbg_prewrite_paranoia_check() argument
136 ret = jffs2_flash_read(c, ofs, len, &retlen, buf); in __jffs2_dbg_prewrite_paranoia_check()
151 ofs, ofs + i); in __jffs2_dbg_prewrite_paranoia_check()
152 __jffs2_dbg_dump_buffer(buf, len, ofs); in __jffs2_dbg_prewrite_paranoia_check()
713 this->ofs, this->ofs+this->size, ref_offset(this->node->raw), in __jffs2_dbg_dump_fragtree_nolock()
718 this->ofs, this->ofs+this->size, this, frag_left(this), in __jffs2_dbg_dump_fragtree_nolock()
720 if (this->ofs != lastofs) in __jffs2_dbg_dump_fragtree_nolock()
[all …]
/fs/ksmbd/
Dasn1.c59 static void encode_asn_tag(char *buf, unsigned int *ofs, char tag, char seq, in encode_asn_tag() argument
63 int index = *ofs; in encode_asn_tag()
79 len = len - (index - *ofs); in encode_asn_tag()
90 *ofs += (index - *ofs); in encode_asn_tag()
97 unsigned int ofs = 0; in build_spnego_ntlmssp_neg_blob() local
112 encode_asn_tag(buf, &ofs, 0xa1, 0x30, neg_result_len + oid_len + in build_spnego_ntlmssp_neg_blob()
116 encode_asn_tag(buf, &ofs, 0xa0, 0x0a, 1); in build_spnego_ntlmssp_neg_blob()
117 buf[ofs++] = 1; in build_spnego_ntlmssp_neg_blob()
120 encode_asn_tag(buf, &ofs, 0xa1, 0x06, NTLMSSP_OID_LEN); in build_spnego_ntlmssp_neg_blob()
121 memcpy(buf + ofs, NTLMSSP_OID_STR, NTLMSSP_OID_LEN); in build_spnego_ntlmssp_neg_blob()
[all …]
/fs/erofs/
Dxattr.c15 unsigned int ofs; member
95 it.ofs = erofs_blkoff(iloc(sbi, vi->nid) + vi->inode_isize); in init_inode_xattrs()
107 ih = (struct erofs_xattr_ibody_header *)(it.kaddr + it.ofs); in init_inode_xattrs()
119 it.ofs += sizeof(struct erofs_xattr_ibody_header); in init_inode_xattrs()
122 if (it.ofs >= EROFS_BLKSIZ) { in init_inode_xattrs()
124 DBG_BUGON(it.ofs != EROFS_BLKSIZ); in init_inode_xattrs()
137 it.ofs = 0; in init_inode_xattrs()
140 le32_to_cpu(*(__le32 *)(it.kaddr + it.ofs)); in init_inode_xattrs()
141 it.ofs += sizeof(__le32); in init_inode_xattrs()
172 if (it->ofs < EROFS_BLKSIZ) in xattr_iter_fixup()
[all …]
Ddir.c24 void *dentry_blk, unsigned int *ofs, in erofs_fill_dentries() argument
27 struct erofs_dirent *de = dentry_blk + *ofs; in erofs_fill_dentries()
61 *ofs += sizeof(struct erofs_dirent); in erofs_fill_dentries()
63 *ofs = maxsize; in erofs_fill_dentries()
73 unsigned int ofs = ctx->pos % EROFS_BLKSIZ; in erofs_readdir() local
108 dirsize - ctx->pos + ofs, PAGE_SIZE); in erofs_readdir()
114 ofs = roundup(ofs, sizeof(struct erofs_dirent)); in erofs_readdir()
115 if (ofs >= nameoff) in erofs_readdir()
119 err = erofs_fill_dentries(dir, ctx, de, &ofs, in erofs_readdir()
126 ctx->pos = blknr_to_addr(i) + ofs; in erofs_readdir()
[all …]
Dinode.c17 unsigned int *ofs) in erofs_read_inode() argument
32 *ofs = erofs_blkoff(inode_loc); in erofs_read_inode()
35 __func__, vi->nid, *ofs, blkaddr); in erofs_read_inode()
44 dic = page_address(page) + *ofs; in erofs_read_inode()
66 if (*ofs + vi->inode_isize <= PAGE_SIZE) { in erofs_read_inode()
67 *ofs += vi->inode_isize; in erofs_read_inode()
70 const unsigned int gotten = PAGE_SIZE - *ofs; in erofs_read_inode()
88 *ofs = vi->inode_isize - gotten; in erofs_read_inode()
89 memcpy((u8 *)copied + gotten, page_address(page), *ofs); in erofs_read_inode()
134 *ofs += vi->inode_isize; in erofs_read_inode()
[all …]
/fs/f2fs/
Dextent_cache.c19 unsigned int ofs) in __lookup_rb_tree_fast() argument
22 if (cached_re->ofs <= ofs && in __lookup_rb_tree_fast()
23 cached_re->ofs + cached_re->len > ofs) { in __lookup_rb_tree_fast()
31 unsigned int ofs) in __lookup_rb_tree_slow() argument
39 if (ofs < re->ofs) in __lookup_rb_tree_slow()
41 else if (ofs >= re->ofs + re->len) in __lookup_rb_tree_slow()
50 struct rb_entry *cached_re, unsigned int ofs) in f2fs_lookup_rb_tree() argument
54 re = __lookup_rb_tree_fast(cached_re, ofs); in f2fs_lookup_rb_tree()
56 return __lookup_rb_tree_slow(root, ofs); in f2fs_lookup_rb_tree()
87 unsigned int ofs, bool *leftmost) in f2fs_lookup_rb_tree_for_insert() argument
[all …]
Dnode.h273 nid_t ino, unsigned int ofs, bool reset) in fill_node_footer() argument
287 rn->footer.flag = cpu_to_le32((ofs << OFFSET_BIT_SHIFT) | in fill_node_footer()
349 unsigned int ofs = ofs_of_node(node_page); in IS_DNODE() local
351 if (f2fs_has_xattr_block(ofs)) in IS_DNODE()
354 if (ofs == 3 || ofs == 4 + NIDS_PER_BLOCK || in IS_DNODE()
355 ofs == 5 + 2 * NIDS_PER_BLOCK) in IS_DNODE()
357 if (ofs >= 6 + 2 * NIDS_PER_BLOCK) { in IS_DNODE()
358 ofs -= 6 + 2 * NIDS_PER_BLOCK; in IS_DNODE()
359 if (!((long int)ofs % (NIDS_PER_BLOCK + 1))) in IS_DNODE()
/fs/ntfs/
Daops.c76 int ofs; in ntfs_end_buffer_async_read() local
79 ofs = 0; in ntfs_end_buffer_async_read()
81 ofs = init_size - file_ofs; in ntfs_end_buffer_async_read()
83 memset(kaddr + bh_offset(bh) + ofs, 0, in ntfs_end_buffer_async_read()
84 bh->b_size - ofs); in ntfs_end_buffer_async_read()
1107 unsigned int ofs; in ntfs_write_mst_block() local
1113 ofs = bh_offset(tbh); in ntfs_write_mst_block()
1119 mft_no = (((s64)page->index << PAGE_SHIFT) + ofs) in ntfs_write_mst_block()
1124 (MFT_RECORD*)(kaddr + ofs), &tni)) { in ntfs_write_mst_block()
1149 err2 = pre_write_mst_fixup((NTFS_RECORD*)(kaddr + ofs), in ntfs_write_mst_block()
[all …]
/fs/omfs/
Ddir.c25 const char *name, int namelen, int *ofs) in omfs_get_bucket() argument
30 *ofs = OMFS_DIR_START + bucket * 8; in omfs_get_bucket()
71 int ofs; in omfs_find_entry() local
74 bh = omfs_get_bucket(dir, name, namelen, &ofs); in omfs_find_entry()
78 block = be64_to_cpu(*((__be64 *) &bh->b_data[ofs])); in omfs_find_entry()
120 int ofs; in omfs_add_link() local
123 bh = omfs_get_bucket(dir, name, namelen, &ofs); in omfs_add_link()
127 entry = (__be64 *) &bh->b_data[ofs]; in omfs_add_link()
166 int ofs; in omfs_delete_entry() local
170 bh = omfs_get_bucket(dir, name, namelen, &ofs); in omfs_delete_entry()
[all …]

12