Home
last modified time | relevance | path

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

12

/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);
288 uint32_t ofs, uint32_t len) in jffs2_fill_scan_buf() argument
293 ret = jffs2_flash_read(c, ofs, len, &retlen, buf); in jffs2_fill_scan_buf()
296 len, ofs, ret); in jffs2_fill_scan_buf()
301 ofs, retlen); in jffs2_fill_scan_buf()
328 struct jffs2_raw_xattr *rx, uint32_t ofs, in jffs2_scan_xattr_node() argument
338 ofs, je32_to_cpu(rx->node_crc), crc); in jffs2_scan_xattr_node()
351 ofs, je32_to_cpu(rx->totlen), totlen); in jffs2_scan_xattr_node()
363 = 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_CACHE_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()
[all …]
Dgc.c517 end = frag->ofs + frag->size; in jffs2_garbage_collect_live()
519 start = frag->ofs; in jffs2_garbage_collect_live()
788 ilen = last_frag->ofs + last_frag->size; in jffs2_garbage_collect_metadata()
1067 ilen = frag->ofs + frag->size; in jffs2_garbage_collect_hole()
1119 for (frag = jffs2_lookup_node_frag(&f->fragtree, fn->ofs); in jffs2_garbage_collect_hole()
1121 if (frag->ofs > fn->size + fn->ofs) in jffs2_garbage_collect_hole()
1182 BUG_ON(frag->ofs != start); in jffs2_garbage_collect_dnode()
1185 while((frag = frag_prev(frag)) && frag->ofs >= min) { in jffs2_garbage_collect_dnode()
1189 if (frag->ofs > min) { in jffs2_garbage_collect_dnode()
1191 frag->ofs, frag->ofs+frag->size); in jffs2_garbage_collect_dnode()
[all …]
Ddebug.h192 uint32_t ofs, int len);
216 __jffs2_dbg_dump_node(struct jffs2_sb_info *c, uint32_t ofs);
227 #define jffs2_dbg_prewrite_paranoia_check(c, ofs, len) \ argument
228 __jffs2_dbg_prewrite_paranoia_check(c, ofs, len)
234 #define jffs2_dbg_prewrite_paranoia_check(c, ofs, len) argument
252 #define jffs2_dbg_dump_node(c, ofs) \ argument
253 __jffs2_dbg_dump_node(c, ofs);
262 #define jffs2_dbg_dump_node(c, ofs) argument
Dwbuf.c230 uint32_t ofs) in jffs2_verify_write() argument
236 ret = mtd_read(c->mtd, ofs, c->wbuf_pagesize, &retlen, c->wbuf_verify); in jffs2_verify_write()
243 __func__, ofs, retlen, c->wbuf_pagesize); in jffs2_verify_write()
282 uint32_t start, end, ofs, len; in jffs2_wbuf_recover() local
405 ofs = write_ofs(c); in jffs2_wbuf_recover()
417 towrite, ofs); in jffs2_wbuf_recover()
422 pr_notice("Faking write error at 0x%08x\n", ofs); in jffs2_wbuf_recover()
424 mtd_write(c->mtd, ofs, towrite, &retlen, brokenbuf); in jffs2_wbuf_recover()
428 ret = mtd_write(c->mtd, ofs, towrite, &retlen, in jffs2_wbuf_recover()
431 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 …]
Dos-linux.h78 #define jffs2_flash_write(c, ofs, len, retlen, buf) jffs2_flash_direct_write(c, ofs, len, retlen, b… argument
79 #define jffs2_flash_read(c, ofs, len, retlen, buf) (mtd_read((c)->mtd, ofs, len, retlen, buf)) argument
115 int jffs2_flash_write(struct jffs2_sb_info *c, loff_t ofs, size_t len, size_t *retlen, const u_char…
116 int jffs2_flash_read(struct jffs2_sb_info *c, loff_t ofs, size_t len, size_t *retlen, u_char *buf);
197 int jffs2_flash_direct_write(struct jffs2_sb_info *c, loff_t ofs, size_t len,
Ddebug.c98 if (frag->ofs & (PAGE_CACHE_SIZE-1) && frag_prev(frag) in __jffs2_dbg_fragtree_paranoia_check_nolock()
105 if ((frag->ofs+frag->size) & (PAGE_CACHE_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 …]
Dwritev.c32 int jffs2_flash_direct_write(struct jffs2_sb_info *c, loff_t ofs, size_t len, in jffs2_flash_direct_write() argument
36 ret = mtd_write(c->mtd, ofs, len, retlen, buf); in jffs2_flash_direct_write()
45 res = jffs2_sum_add_kvec(c, vecs, 1, (uint32_t) ofs); in jffs2_flash_direct_write()
Derase.c343 uint32_t ofs; in jffs2_block_check_erase() local
388 for (ofs = jeb->offset; ofs < jeb->offset + c->sector_size; ) { in jffs2_block_check_erase()
389 uint32_t readlen = min((uint32_t)PAGE_SIZE, jeb->offset + c->sector_size - ofs); in jffs2_block_check_erase()
392 *bad_offset = ofs; in jffs2_block_check_erase()
394 ret = mtd_read(c->mtd, ofs, readlen, &retlen, ebuf); in jffs2_block_check_erase()
397 ofs, ret); in jffs2_block_check_erase()
403 ofs, readlen, retlen); in jffs2_block_check_erase()
418 ofs += readlen; in jffs2_block_check_erase()
Dsummary.h185 int jffs2_sum_add_inode_mem(struct jffs2_summary *s, struct jffs2_raw_inode *ri, uint32_t ofs);
186 int jffs2_sum_add_dirent_mem(struct jffs2_summary *s, struct jffs2_raw_dirent *rd, uint32_t ofs);
187 int jffs2_sum_add_xattr_mem(struct jffs2_summary *s, struct jffs2_raw_xattr *rx, uint32_t ofs);
188 int jffs2_sum_add_xref_mem(struct jffs2_summary *s, struct jffs2_raw_xref *rr, uint32_t ofs);
Dnodemgmt.c453 uint32_t ofs, uint32_t len, in jffs2_add_physical_node_ref() argument
459 jeb = &c->blocks[ofs / c->sector_size]; in jffs2_add_physical_node_ref()
462 __func__, ofs & ~3, ofs & 3, len); in jffs2_add_physical_node_ref()
467 if ((c->nextblock || ((ofs & 3) != REF_OBSOLETE)) in jffs2_add_physical_node_ref()
468 && (jeb != c->nextblock || (ofs & ~3) != jeb->offset + (c->sector_size - jeb->free_size))) { in jffs2_add_physical_node_ref()
470 ofs & ~3, ofs & 3); in jffs2_add_physical_node_ref()
482 new = jffs2_link_node_ref(c, jeb, ofs, len, ic); in jffs2_add_physical_node_ref()
/fs/logfs/
Ddev_mtd.c14 #define PAGE_OFS(ofs) ((ofs) & (PAGE_SIZE-1)) argument
16 static int logfs_mtd_read(struct super_block *sb, loff_t ofs, size_t len, in logfs_mtd_read() argument
23 ret = mtd_read(mtd, ofs, len, &retlen, buf); in logfs_mtd_read()
35 static int loffs_mtd_write(struct super_block *sb, loff_t ofs, size_t len, in loffs_mtd_write() argument
47 BUG_ON((ofs >= mtd->size) || (len > mtd->size - ofs)); in loffs_mtd_write()
48 BUG_ON(ofs != (ofs >> super->s_writeshift) << super->s_writeshift); in loffs_mtd_write()
50 page_start = ofs & PAGE_CACHE_MASK; in loffs_mtd_write()
51 page_end = PAGE_CACHE_ALIGN(ofs + len) - 1; in loffs_mtd_write()
52 ret = mtd_write(mtd, ofs, len, &retlen, buf); in loffs_mtd_write()
72 static int logfs_mtd_erase_mapping(struct super_block *sb, loff_t ofs, in logfs_mtd_erase_mapping() argument
[all …]
Dsegment.c41 s32 ofs; in logfs_get_free_bytes() local
45 ofs = area->a_used_bytes; in logfs_get_free_bytes()
49 return dev_ofs(area->a_sb, area->a_segno, ofs); in logfs_get_free_bytes()
70 int __logfs_buf_write(struct logfs_area *area, u64 ofs, void *buf, size_t len, in __logfs_buf_write() argument
73 pgoff_t index = ofs >> PAGE_SHIFT; in __logfs_buf_write()
75 long offset = ofs & (PAGE_SIZE-1); in __logfs_buf_write()
108 u64 ofs = dev_ofs(sb, area->a_segno, area->a_used_bytes); in pad_partial_page() local
109 pgoff_t index = ofs >> PAGE_SHIFT; in pad_partial_page()
110 long offset = ofs & (PAGE_SIZE-1); in pad_partial_page()
129 u64 ofs = dev_ofs(sb, area->a_segno, area->a_used_bytes); in pad_full_pages() local
[all …]
Ddev_bdev.c15 #define PAGE_OFS(ofs) ((ofs) & (PAGE_SIZE-1)) argument
91 static int __bdev_writeseg(struct super_block *sb, u64 ofs, pgoff_t index, in __bdev_writeseg() argument
114 bio->bi_sector = ofs >> 9; in __bdev_writeseg()
120 ofs += i * PAGE_SIZE; in __bdev_writeseg()
142 bio->bi_sector = ofs >> 9; in __bdev_writeseg()
150 static void bdev_writeseg(struct super_block *sb, u64 ofs, size_t len) in bdev_writeseg() argument
164 head = ofs & (PAGE_SIZE - 1); in bdev_writeseg()
166 ofs -= head; in bdev_writeseg()
170 __bdev_writeseg(sb, ofs, ofs >> PAGE_SHIFT, len >> PAGE_SHIFT); in bdev_writeseg()
188 static int do_erase(struct super_block *sb, u64 ofs, pgoff_t index, in do_erase() argument
[all …]
Djournal.c119 u64 ofs; in read_area() local
133 ofs = dev_ofs(sb, area->a_segno, area->a_written_bytes); in read_area()
135 return logfs_buf_recover(area, ofs, a + 1, super->s_writesize); in read_area()
137 return logfs_buf_recover(area, ofs, NULL, 0); in read_area()
159 static int __read_je_header(struct super_block *sb, u64 ofs, in __read_je_header() argument
169 err = wbuf_read(sb, ofs, sizeof(*jh), jh); in __read_je_header()
184 static int __read_je_payload(struct super_block *sb, u64 ofs, in __read_je_payload() argument
191 err = wbuf_read(sb, ofs + sizeof(*jh), len, jh + 1); in __read_je_payload()
211 static int __read_je(struct super_block *sb, u64 ofs, in __read_je() argument
216 err = __read_je_header(sb, ofs, jh); in __read_je()
[all …]
Dlogfs.h151 struct page *(*find_first_sb)(struct super_block *sb, u64 *ofs);
152 struct page *(*find_last_sb)(struct super_block *sb, u64 *ofs);
155 void (*writeseg)(struct super_block *sb, u64 ofs, size_t len);
156 int (*erase)(struct super_block *sb, loff_t ofs, size_t len,
158 int (*can_write_buf)(struct super_block *sb, u64 ofs);
551 int logfs_rewrite_block(struct inode *inode, u64 bix, u64 ofs,
553 int logfs_is_valid_block(struct super_block *sb, u64 ofs, u64 ino, u64 bix,
567 void logfs_set_segment_used(struct super_block *sb, u64 ofs, int increment);
585 int logfs_erase_segment(struct super_block *sb, u32 ofs, int ensure_erase);
586 int wbuf_read(struct super_block *sb, u64 ofs, size_t len, void *buf);
[all …]
Dreadwrite.c956 static int logfs_is_valid_direct(struct logfs_inode *li, u64 bix, u64 ofs) in logfs_is_valid_direct() argument
958 return pure_ofs(li->li_data[bix]) == ofs; in logfs_is_valid_direct()
962 u64 ofs, u64 bofs) in __logfs_is_valid_loop() argument
984 if (pure_ofs(bofs) == ofs) in __logfs_is_valid_loop()
990 static int logfs_is_valid_loop(struct inode *inode, u64 bix, u64 ofs) in logfs_is_valid_loop() argument
1001 if (pure_ofs(bofs) == ofs) in logfs_is_valid_loop()
1004 return __logfs_is_valid_loop(inode, bix, ofs, bofs); in logfs_is_valid_loop()
1007 static int __logfs_is_valid_block(struct inode *inode, u64 bix, u64 ofs) in __logfs_is_valid_block() argument
1015 return logfs_is_valid_direct(li, bix, ofs); in __logfs_is_valid_block()
1016 return logfs_is_valid_loop(inode, bix, ofs); in __logfs_is_valid_block()
[all …]
Dgc.c113 static void logfs_cleanse_block(struct super_block *sb, u64 ofs, u64 ino, in logfs_cleanse_block() argument
120 err = logfs_rewrite_block(inode, bix, ofs, gc_level, 0); in logfs_cleanse_block()
130 u64 ofs, ino, bix; in logfs_gc_segment() local
150 ofs = dev_ofs(sb, logical_segno, seg_ofs); in logfs_gc_segment()
167 valid = logfs_is_valid_block(sb, ofs, ino, bix, gc_level); in logfs_gc_segment()
169 logfs_cleanse_block(sb, ofs, ino, bix, gc_level); in logfs_gc_segment()
638 u64 ofs = dev_ofs(sb, area->a_segno, area->a_written_bytes); in check_area() local
643 if (super->s_devops->can_write_buf(sb, ofs) == 0) in check_area()
646 printk(KERN_INFO"LogFS: Possibly incomplete write at %llx\n", ofs); in check_area()
/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 …]
/fs/cifs/
Dlink.c144 unsigned int ofs; in CIFSFormatMFSymlink() local
166 ofs = CIFS_MF_SYMLINK_LINK_OFFSET; in CIFSFormatMFSymlink()
167 memcpy(buf + ofs, link_str, link_len); in CIFSFormatMFSymlink()
169 ofs += link_len; in CIFSFormatMFSymlink()
170 if (ofs < CIFS_MF_SYMLINK_FILE_SIZE) { in CIFSFormatMFSymlink()
171 buf[ofs] = '\n'; in CIFSFormatMFSymlink()
172 ofs++; in CIFSFormatMFSymlink()
175 while (ofs < CIFS_MF_SYMLINK_FILE_SIZE) { in CIFSFormatMFSymlink()
176 buf[ofs] = ' '; in CIFSFormatMFSymlink()
177 ofs++; in CIFSFormatMFSymlink()
/fs/ntfs/
Daops.c90 int ofs; in ntfs_end_buffer_async_read() local
93 ofs = 0; in ntfs_end_buffer_async_read()
95 ofs = init_size - file_ofs; in ntfs_end_buffer_async_read()
98 memset(kaddr + bh_offset(bh) + ofs, 0, in ntfs_end_buffer_async_read()
99 bh->b_size - ofs); in ntfs_end_buffer_async_read()
1125 unsigned int ofs; in ntfs_write_mst_block() local
1131 ofs = bh_offset(tbh); in ntfs_write_mst_block()
1137 mft_no = (((s64)page->index << PAGE_CACHE_SHIFT) + ofs) in ntfs_write_mst_block()
1142 (MFT_RECORD*)(kaddr + ofs), &tni)) { in ntfs_write_mst_block()
1167 err2 = pre_write_mst_fixup((NTFS_RECORD*)(kaddr + ofs), in ntfs_write_mst_block()
[all …]

12