Home
last modified time | relevance | path

Searched refs:i_size (Results 1 – 25 of 60) sorted by relevance

123

/netbsd/src/usr.bin/patch/
Dinp.c61 static off_t i_size; /* size of the input file */ variable
86 i_size = 0; in re_input()
90 munmap(i_womp, i_size); in re_input()
127 munmap(i_womp, i_size); in reallocate_lines()
282 i_size = filestat.st_size; in plan_a()
288 if ((uintmax_t)i_size > (uintmax_t)SIZE_MAX) { in plan_a()
295 if (i_size) { in plan_a()
296 i_womp = mmap(NULL, i_size, PROT_READ, MAP_PRIVATE, ifd, 0); in plan_a()
308 if (i_size) in plan_a()
309 madvise(i_womp, i_size, MADV_SEQUENTIAL); in plan_a()
[all …]
/netbsd/src/sys/ufs/lfs/
Dlfs_inode.c235 KASSERT(oip->i_size == 0); in lfs_truncate()
245 (oip->i_size < fs->um_maxsymlinklen || in lfs_truncate()
250 memset((char *)SHORTLINK(oip), 0, (u_int)oip->i_size); in lfs_truncate()
251 oip->i_size = 0; in lfs_truncate()
256 if (oip->i_size == length) { in lfs_truncate()
263 osize = oip->i_size; in lfs_truncate()
311 KASSERT(ovp->v_size == oip->i_size); in lfs_truncate()
312 … oip->i_lfs_hiblk = lfs_lblkno(fs, oip->i_size + lfs_sb_getbsize(fs) - 1) - 1; in lfs_truncate()
325 oip->i_size = length; in lfs_truncate()
326 lfs_dino_setsize(fs, oip->i_din, oip->i_size); in lfs_truncate()
[all …]
Dulfs_readwrite.c95 if (uio->uio_offset >= ip->i_size) in READ()
104 bytelen = MIN(ip->i_size - uio->uio_offset, uio->uio_resid); in READ()
141 KASSERT(vp->v_type != VLNK || ip->i_size >= fs->um_maxsymlinklen); in BUFRD()
153 if (uio->uio_offset >= ip->i_size) in BUFRD()
157 bytesinfile = ip->i_size - uio->uio_offset; in BUFRD()
167 if (lfs_lblktosize(fs, nextlbn) >= ip->i_size) in BUFRD()
251 KASSERT(vp->v_size == ip->i_size); in WRITE()
256 uio->uio_offset = ip->i_size; in WRITE()
257 if ((ip->i_flags & APPEND) && uio->uio_offset != ip->i_size) in WRITE()
275 osize = ip->i_size; in WRITE()
[all …]
Dulfs_lookup.c250 enduseful = dp->i_size; in ulfs_lookup()
258 enduseful = dp->i_size; in ulfs_lookup()
271 results->ulr_offset = roundup(dp->i_size, dirblksiz); in ulfs_lookup()
281 results->ulr_diroff >= dp->i_size) { in ulfs_lookup()
295 endsearch = roundup(dp->i_size, dirblksiz); in ulfs_lookup()
468 results->ulr_offset = roundup(dp->i_size, dirblksiz); in ulfs_lookup()
519 if (results->ulr_offset + LFS_DIRSIZ(fs, ep) > dp->i_size) { in ulfs_lookup()
521 dp->i_size = in ulfs_lookup()
523 DIP_ASSIGN(dp, size, dp->i_size); in ulfs_lookup()
801 dp->i_size = ulr->ulr_offset + dirblksiz; in ulfs_direnter()
[all …]
Dlfs_balloc.c177 lastblock = lfs_lblkno(fs, ip->i_size); in lfs_balloc()
194 ip->i_size = (lastblock + 1) * lfs_sb_getbsize(fs); in lfs_balloc()
195 lfs_dino_setsize(fs, ip->i_din, ip->i_size); in lfs_balloc()
196 uvm_vnp_setsize(vp, ip->i_size); in lfs_balloc()
212 if (lbn < ULFS_NDADDR && lfs_lblkno(fs, ip->i_size) <= lbn) { in lfs_balloc()
215 if (lfs_lblktosize(fs, lbn) >= ip->i_size) { in lfs_balloc()
Dlfs_alloc.c138 blkno = lfs_lblkno(fs, ip->i_size); in lfs_extend_ifile()
139 if ((error = lfs_balloc(vp, ip->i_size, lfs_sb_getbsize(fs), cred, 0, in lfs_extend_ifile()
143 ip->i_size += lfs_sb_getbsize(fs); in lfs_extend_ifile()
144 lfs_dino_setsize(fs, ip->i_din, ip->i_size); in lfs_extend_ifile()
145 uvm_vnp_setsize(vp, ip->i_size); in lfs_extend_ifile()
152 maxino = ((ip->i_size >> lfs_sb_getbshift(fs)) - lfs_sb_getcleansz(fs) - in lfs_extend_ifile()
343 while (VTOI(fs->lfs_ivnode)->i_size <= (ino / in lfs_valloc_fixed()
Dlfs_rfw.c206 if (ip->i_size <= (lbn << lfs_sb_getbshift(fs))) { in update_meta()
217 if (ip->i_size < newsize) { in update_meta()
218 ip->i_size = newsize; in update_meta()
234 KASSERT((lfs_lblkno(fs, ip->i_size) > ULFS_NDADDR && in update_meta()
347 if (lfs_dino_getsize(fs, dip) != ip->i_size) in update_inoblk()
359 ip->i_size = lfs_dino_getsize(fs, dip); in update_inoblk()
Dulfs_vnops.c943 *ap->a_eofflag = VTOI(vp)->i_size <= calleruio->uio_offset; in ulfs_readdir()
972 isize = ip->i_size; in ulfs_readlink()
1003 (long long)ip->i_size); in ulfs_print()
1165 return lf_advlock(ap, &ip->i_lockf, ip->i_size); in ulfs_advlock()
1254 if (ip->i_size < off + bsize) { in ulfs_gop_alloc()
1256 (uintptr_t)vp, ip->i_size, off + bsize, 0); in ulfs_gop_alloc()
1257 ip->i_size = off + bsize; in ulfs_gop_alloc()
1258 DIP_ASSIGN(ip, size, ip->i_size); in ulfs_gop_alloc()
Dulfs_dirhash.c141 ip->i_size < (ulfs_dirhashminblks * dirblksiz) || in ulfsdirhash_build()
146 if (ip->i_size < (ulfs_dirhashminblks * dirblksiz) || in ulfsdirhash_build()
164 KASSERT(ip->i_size >= dirblksiz); in ulfsdirhash_build()
165 nslots = ip->i_size / LFS_DIRECTSIZ(fs, 1); in ulfsdirhash_build()
169 dirblocks = howmany(ip->i_size, dirblksiz); in ulfsdirhash_build()
230 while (pos < ip->i_size) { in ulfsdirhash_build()
428 if (offset < 0 || offset >= ip->i_size) in ulfsdirhash_lookup()
/netbsd/src/sys/ufs/ufs/
Dufs_readwrite.c98 if (uio->uio_offset >= ip->i_size) in READ()
107 bytelen = MIN(ip->i_size - uio->uio_offset, uio->uio_resid); in READ()
145 KASSERT(vp->v_type != VLNK || ip->i_size >= ump->um_maxsymlinklen); in BUFRD()
156 if (uio->uio_offset >= ip->i_size) in BUFRD()
160 bytesinfile = ip->i_size - uio->uio_offset; in BUFRD()
170 if (ufs_lblktosize(fs, nextlbn) >= ip->i_size) in BUFRD()
262 KASSERT(vp->v_size == ip->i_size); in WRITE()
269 uio->uio_offset = ip->i_size; in WRITE()
270 if ((ip->i_flags & APPEND) && uio->uio_offset != ip->i_size) in WRITE()
284 osize = ip->i_size; in WRITE()
[all …]
Dufs_lookup.c132 return dp->i_size; in slot_findfree()
136 return dp->i_size; in slot_findfree()
141 return dp->i_size; in slot_findfree()
187 results->ulr_offset = roundup(ip->i_size, dirblksiz); in slot_estimate()
464 results->ulr_offset = roundup(dp->i_size, dirblksiz); in ufs_lookup()
474 results->ulr_diroff >= dp->i_size) { in ufs_lookup()
489 endsearch = roundup(dp->i_size, dirblksiz); in ufs_lookup()
665 if (newisize > dp->i_size) { in ufs_lookup()
667 dp->i_size = newisize; in ufs_lookup()
668 DIP_ASSIGN(dp, size, dp->i_size); in ufs_lookup()
[all …]
Dufs_dirhash.c138 ip->i_size < (ufs_dirhashminblks * dirblksiz) || in ufsdirhash_build()
143 if (ip->i_size < (ufs_dirhashminblks * dirblksiz) || in ufsdirhash_build()
161 KASSERT(ip->i_size >= dirblksiz); in ufsdirhash_build()
162 nslots = ip->i_size / UFS_DIRECTSIZ(1); in ufsdirhash_build()
166 dirblocks = howmany(ip->i_size, dirblksiz); in ufsdirhash_build()
227 while (pos < ip->i_size) { in ufsdirhash_build()
422 if (offset < 0 || offset >= ip->i_size) in ufsdirhash_lookup()
Dufs_vnops.c1334 ip->i_size = dirblksiz; in ufs_mkdir()
1337 uvm_vnp_setsize(tvp, ip->i_size); in ufs_mkdir()
1530 ip->i_size = len; in ufs_symlink()
1532 uvm_vnp_setsize(vp, ip->i_size); in ufs_symlink()
1819 *ap->a_eofflag = VTOI(vp)->i_size <= calleruio->uio_offset; in ufs_readdir()
1845 isize = ip->i_size; in ufs_readlink()
1943 (long long)ip->i_size); in ufs_print()
2163 return lf_advlock(ap, &ip->i_lockf, ip->i_size); in ufs_advlock()
2343 if (ip->i_size < off + bsize) { in ufs_gop_alloc()
2345 (uintptr_t)vp, ip->i_size, off + bsize, 0); in ufs_gop_alloc()
[all …]
Dufs_inode.c317 } while (ip->i_size != newsize); in ufs_truncate_retry()
328 off_t isize = ip->i_size; in ufs_truncate_all()
/netbsd/src/sys/ufs/ffs/
Dffs_inode.c231 KASSERT(oip->i_size == 0); in ffs_truncate()
291 (oip->i_size < ump->um_maxsymlinklen || in ffs_truncate()
294 memset(SHORTLINK(oip), 0, (size_t)oip->i_size); in ffs_truncate()
295 oip->i_size = 0; in ffs_truncate()
300 if (oip->i_size == length) { in ffs_truncate()
312 osize = oip->i_size; in ffs_truncate()
352 KASSERT(ovp->v_size == oip->i_size); in ffs_truncate()
400 oip->i_size = length; in ffs_truncate()
460 oip->i_size = osize; in ffs_truncate()
547 oip->i_size = length; in ffs_truncate()
[all …]
Dffs_balloc.c147 lastlbn = ffs_lblkno(fs, ip->i_size); in ffs_balloc_ufs1()
160 ip->i_size = ffs_lblktosize(fs, nb + 1); in ffs_balloc_ufs1()
161 ip->i_ffs1_size = ip->i_size; in ffs_balloc_ufs1()
180 if (nb != 0 && ip->i_size >= ffs_lblktosize(fs, lbn + 1)) { in ffs_balloc_ufs1()
204 osize = ffs_fragroundup(fs, ffs_blkoff(fs, ip->i_size)); in ffs_balloc_ufs1()
244 if (ip->i_size < ffs_lblktosize(fs, lbn + 1)) in ffs_balloc_ufs1()
665 lastlbn = ffs_lblkno(fs, ip->i_size); in ffs_balloc_ufs2()
678 ip->i_size = ffs_lblktosize(fs, nb + 1); in ffs_balloc_ufs2()
679 ip->i_ffs2_size = ip->i_size; in ffs_balloc_ufs2()
680 uvm_vnp_setsize(vp, ip->i_size); in ffs_balloc_ufs2()
[all …]
Dffs_subr.c92 ip->i_size = ip->i_ffs1_size; in ffs_load_inode()
108 ip->i_size = ip->i_ffs2_size; in ffs_load_inode()
/netbsd/src/external/bsd/iscsi/dist/src/osd/
Dosdfs.c185 if ((*size=inode.i_size)) { in entries_get()
238 …if (osd_write((void *)&dev, root_gid, uid, inode.i_size, strlen(entry), entry, 0, &osd_exec_via_sc… in entry_add()
388 inode->i_size = ((struct inode *)(attr))->i_size; in osdfs_read_inode()
569 if (entry_add(dev, dir_ino, ino, name, &dir->i_size)!=0) { in osdfs_link()
604 if (entry_del(dev, dir_ino, ino, name, &(dir->i_size))!=0) { in osdfs_unlink()
697 if (entry_add(dev, dir->i_ino, inode->i_ino, name, &dir->i_size)!=0) { in osdfs_mknod()
730 if (entry_del(dev, old_dir_ino, old_ino, old_name, &old_dir->i_size)!=0) { in osdfs_rename()
751 if (entry_add(dev, new_dir_ino, new_ino, new_name, &new_dir->i_size)!=0) { in osdfs_rename()
902 if (Offset+Length>inode->i_size) { in osdfs_readpage()
903 len = inode->i_size-Offset; in osdfs_readpage()
[all …]
/netbsd/src/sys/arch/amd64/amd64/
Ddb_disasm.c123 short i_size; /* operand size */ member
1183 int i_size; in db_disasm() local
1282 i_size = ip->i_size; in db_disasm()
1288 i_size = ip->i_size; in db_disasm()
1320 i_size = ip->i_size; in db_disasm()
1323 if (i_size == SDEP) { in db_disasm()
1330 if (i_size != NONE) { in db_disasm()
1331 if (i_size == BYTE) { in db_disasm()
1334 } else if (i_size == WORD) { in db_disasm()
1339 } else if (i_size == QUAD) { in db_disasm()
/netbsd/src/sys/fs/cd9660/
Dcd9660_vnops.c186 vap->va_size = (u_quad_t) ip->i_size; in cd9660_getattr()
187 if (ip->i_size == 0 && vp->v_type == VLNK) { in cd9660_getattr()
212 vap->va_bytes = (u_quad_t) ip->i_size; in cd9660_getattr()
243 if (uio->uio_offset >= ip->i_size) in cd9660_read()
253 vsize_t bytelen = MIN(ip->i_size - uio->uio_offset, in cd9660_read()
270 diff = (off_t)ip->i_size - uio->uio_offset; in cd9660_read()
277 if (cd9660_lblktosize(imp, rablock) < ip->i_size) { in cd9660_read()
442 endsearch = dp->i_size; in cd9660_readdir()
Dcd9660_bmap.c94 nblk = (ip->i_size >> bshift) - (lblkno + 1); in cd9660_bmap()
Dcd9660_lookup.c183 dp->i_diroff > dp->i_size) { in cd9660_lookup()
196 endsearch = dp->i_size; in cd9660_lookup()
/netbsd/src/sys/arch/i386/i386/
Ddb_disasm.c106 short i_size; /* operand size */ member
1124 int i_size; in db_disasm() local
1210 i_size = ip->i_size; in db_disasm()
1213 if (i_size == RDEP) { in db_disasm()
1219 i_size = ip->i_size; in db_disasm()
1249 if (i_size == SDEP) { in db_disasm()
1256 if (i_size != NONE) { in db_disasm()
1257 if (i_size == BYTE) { in db_disasm()
1260 } else if (i_size == WORD) { in db_disasm()
/netbsd/src/sys/fs/filecorefs/
Dfilecore_vnops.c181 vap->va_size = (u_quad_t) ip->i_size; in filecore_getattr()
216 if (uio->uio_offset >= ip->i_size) in filecore_read()
226 vsize_t bytelen = MIN(ip->i_size - uio->uio_offset, in filecore_read()
245 diff = (off_t)ip->i_size - uio->uio_offset; in filecore_read()
/netbsd/src/usr.bin/fstat/
Disofs.c59 fsp->size = inode.i_size; in isofs_filestat()

123