/titanic_41/usr/src/uts/common/sys/fs/ |
H A D | ufs_trans.h | 112 #define TRANS_ISTRANS(ufsvfsp) (ufsvfsp->vfs_log) argument 117 #define TRANS_BEGIN_SYNC(ufsvfsp, vid, vsize, error)\ argument 119 if (TRANS_ISTRANS(ufsvfsp)) { \ 121 top_begin_sync(ufsvfsp, vid, vsize, &error); \ 128 #define TRANS_BEGIN_ASYNC(ufsvfsp, vid, vsize)\ argument 130 if (TRANS_ISTRANS(ufsvfsp))\ 131 (void) top_begin_async(ufsvfsp, vid, vsize, 0); \ 137 #define TRANS_TRY_BEGIN_ASYNC(ufsvfsp, vid, vsize, err)\ argument 139 if (TRANS_ISTRANS(ufsvfsp))\ 140 err = top_begin_async(ufsvfsp, vid, vsize, 1); \ [all …]
|
H A D | ufs_bio.h | 70 #define UFS_BREAD(ufsvfsp, dev, blkno, bsize) \ argument 71 bread_common(ufsvfsp, dev, blkno, bsize) 72 #define UFS_BWRITE(ufsvfsp, bp) \ argument 73 bwrite_common(ufsvfsp, bp, /* force_wait */ 0, /* do_relse */ 1, \ 75 #define UFS_BRWRITE(ufsvfsp, bp) \ argument 77 bwrite_common(ufsvfsp, bp, /* force_wait */ 0, /* do_relse */ 1, \ 79 #define UFS_BWRITE2(ufsvfsp, bp) \ argument 80 bwrite_common(ufsvfsp, bp, /* force_wait */ 1, /* do_relse */ 0, \ 82 #define UFS_GETBLK(ufsvfsp, dev, blkno, bsize) \ argument 83 getblk_common(ufsvfsp, dev, blkno, bsize, /* errflg */ 0)
|
H A D | ufs_fs.h | 401 #define fs_postbl(ufsvfsp, cylno) \ argument 402 (((ufsvfsp)->vfs_fs->fs_postblformat != FS_DYNAMICPOSTBLFMT) \ 403 ? ((ufsvfsp)->vfs_fs->fs_opostbl[cylno]) \ 404 : ((short *)((char *)(ufsvfsp)->vfs_fs + \ 405 (ufsvfsp)->vfs_fs->fs_postbloff) \ 406 + (cylno) * (ufsvfsp)->vfs_nrpos)) 470 #define cg_blks(ufsvfsp, cgp, cylno) \ argument 474 (cylno) * (ufsvfsp)->vfs_nrpos)) 606 #define cbtorpos(ufsvfsp, bno) \ argument 607 ((((bno) * NSPF((ufsvfsp)->vfs_fs) % (ufsvfsp)->vfs_fs->fs_spc) % \ [all …]
|
/titanic_41/usr/src/uts/common/fs/ufs/ |
H A D | quotacalls.c | 91 struct ufsvfs *ufsvfsp; in quotactl() local 113 ufsvfsp = NULL; in quotactl() 115 ufsvfsp = (struct ufsvfs *)(vp->v_vfsp->vfs_data); in quotactl() 126 error = opendq(ufsvfsp, vp, cr); in quotactl() 130 error = closedq(ufsvfsp, cr); in quotactl() 132 invalidatedq(ufsvfsp); in quotactl() 138 error = setquota(quot.op, (uid_t)quot.uid, ufsvfsp, in quotactl() 143 error = getquota((uid_t)quot.uid, ufsvfsp, (caddr_t)quot.addr, in quotactl() 148 error = qsync(ufsvfsp); in quotactl() 165 struct ufsvfs *ufsvfsp = ip->i_ufsvfs; in opendq_scan_inode() local [all …]
|
H A D | ufs_trans.c | 68 struct ufsvfs *ufsvfsp; in ufs_trans_hlock() local 77 for (ufsvfsp = ufs_instances; ufsvfsp; ufsvfsp = ufsvfsp->vfs_next) { in ufs_trans_hlock() 81 if ((ufsvfsp->vfs_vfs == NULL) || in ufs_trans_hlock() 82 (ufsvfsp->vfs_validfs == UT_UNMOUNTED)) in ufs_trans_hlock() 87 if (TRANS_ISERROR(ufsvfsp)) in ufs_trans_hlock() 88 ufsvfsp->vfs_validfs = UT_HLOCKING; in ufs_trans_hlock() 97 for (ufsvfsp = ufs_instances; ufsvfsp; ufsvfsp = ufsvfsp->vfs_next) in ufs_trans_hlock() 98 if (ufsvfsp->vfs_validfs == UT_HLOCKING) in ufs_trans_hlock() 101 if (ufsvfsp == NULL) in ufs_trans_hlock() 106 (void) ufs_fiolfss(ufsvfsp->vfs_root, &lockfs); in ufs_trans_hlock() [all …]
|
H A D | ufs_vfsops.c | 474 ufsvfs_t *ufsvfsp; in ufs_mountroot() local 503 ufsvfsp = (ufsvfs_t *)vfsp->vfs_data; in ufs_mountroot() 504 fsp = ufsvfsp->vfs_fs; in ufs_mountroot() 505 if (TRANS_ISTRANS(ufsvfsp) && in ufs_mountroot() 506 !TRANS_ISERROR(ufsvfsp) && in ufs_mountroot() 508 ml_unit_t *ul = ufsvfsp->vfs_log; in ufs_mountroot() 511 ufsvfsp, fsp); in ufs_mountroot() 514 UFS_BWRITE2(NULL, ufsvfsp->vfs_bufp); in ufs_mountroot() 568 ufsvfsp = (ufsvfs_t *)vfsp->vfs_data; in ufs_mountroot() 569 if (ufsvfsp->vfs_log) { in ufs_mountroot() [all …]
|
H A D | ufs_alloc.c | 108 struct ufsvfs *ufsvfsp; in alloc() local 116 ufsvfsp = ip->i_ufsvfs; in alloc() 117 fs = ufsvfsp->vfs_fs; in alloc() 126 if (freespace(fs, ufsvfsp) <= 0 && in alloc() 127 secpolicy_fs_minfree(cr, ufsvfsp->vfs_vfs) != 0) in alloc() 163 mutex_enter(&ufsvfsp->vfs_lock); in alloc() 164 if ((now - ufsvfsp->vfs_lastwhinetime) > (hz << 2) && in alloc() 165 (!(TRANS_ISTRANS(ufsvfsp)) || !(ip->i_flag & IQUIET))) { in alloc() 166 ufsvfsp->vfs_lastwhinetime = now; in alloc() 169 mutex_exit(&ufsvfsp->vfs_lock); in alloc() [all …]
|
H A D | ufs_subr.c | 156 struct ufsvfs *ufsvfsp; in ufs_funmount_cleanup() local 164 while ((ufsvfsp = oldufsvfslist) != NULL) { in ufs_funmount_cleanup() 165 oldufsvfslist = ufsvfsp->vfs_next; in ufs_funmount_cleanup() 167 mutex_destroy(&ufsvfsp->vfs_lock); in ufs_funmount_cleanup() 168 kmem_free(ufsvfsp, sizeof (struct ufsvfs)); in ufs_funmount_cleanup() 389 struct ufsvfs *ufsvfsp; in ufs_sync_inode() local 415 ufsvfsp = ip->i_ufsvfs; in ufs_sync_inode() 420 if (((flag & (IMOD|IMODACC|IUPD|ICHG|IACC)) == IMODACC) && ufsvfsp) { in ufs_sync_inode() 426 if (cheap && (ufsvfsp->vfs_dfritime & UFS_DFRATIME) && in ufs_sync_inode() 427 (ufsvfsp->vfs_iotstamp + ufs_iowait < ddi_get_lbolt())) in ufs_sync_inode() [all …]
|
H A D | lufs.c | 210 lufs_unsnarf(ufsvfs_t *ufsvfsp) in lufs_unsnarf() argument 215 ul = ufsvfsp->vfs_log; in lufs_unsnarf() 264 ufsvfsp->vfs_log = NULL; in lufs_unsnarf() 268 lufs_snarf(ufsvfs_t *ufsvfsp, struct fs *fs, int ronly) in lufs_snarf() argument 287 bp = UFS_BREAD(ufsvfsp, ufsvfsp->vfs_dev, logbtodb(fs, fs->fs_logbno), in lufs_snarf() 334 bp = UFS_BREAD(ufsvfsp, ufsvfsp->vfs_dev, bno, DEV_BSIZE); in lufs_snarf() 337 bp = UFS_BREAD(ufsvfsp, ufsvfsp->vfs_dev, bno + 1, DEV_BSIZE); in lufs_snarf() 385 ul->un_ufsvfs = ufsvfsp; in lufs_snarf() 386 ul->un_dev = ufsvfsp->vfs_dev; in lufs_snarf() 404 ufsvfsp->vfs_log = ul; in lufs_snarf() [all …]
|
H A D | ufs_filio.c | 286 struct ufsvfs *ufsvfsp = VTOI(vp)->i_ufsvfs; in ufs_fiogdio() local 291 if (ufsvfsp == NULL) in ufs_fiogdio() 294 if (suword32(diop, ufsvfsp->vfs_dio)) in ufs_fiogdio() 313 struct ufsvfs *ufsvfsp; in ufs_fiosdio() local 337 ufsvfsp = ip->i_ufsvfs; in ufs_fiosdio() 338 ulp = &ufsvfsp->vfs_ulockfs; in ufs_fiosdio() 341 if (TRANS_ISTRANS(ufsvfsp)) in ufs_fiosdio() 369 mutex_enter(&ufsvfsp->vfs_lock); in ufs_fiosdio() 370 ufsvfsp->vfs_dio = dio; in ufs_fiosdio() 383 ufs_sbwrite(ufsvfsp); in ufs_fiosdio() [all …]
|
H A D | ufs_lockfs.c | 341 struct ufsvfs *ufsvfsp = (struct ufsvfs *)vfsp->vfs_data; in ufs_flush() local 342 struct fs *fs = ufsvfsp->vfs_fs; in ufs_flush() 361 (void) qsync(ufsvfsp); in ufs_flush() 366 if (error = ufs_scan_inodes(0, ufs_flush_inode, ufsvfsp, ufsvfsp)) in ufs_flush() 374 TRANS_SBUPDATE(ufsvfsp, vfsp, TOP_SBUPDATE_FLUSH); in ufs_flush() 379 if ((error = VOP_PUTPAGE(common_specvp(ufsvfsp->vfs_devvp), in ufs_flush() 408 if (TRANS_ISTRANS(ufsvfsp)) { in ufs_flush() 409 ml_unit_t *ul = ufsvfsp->vfs_log; in ufs_flush() 424 TRANS_BEGIN_SYNC(ufsvfsp, TOP_COMMIT_FLUSH, in ufs_flush() 428 TRANS_END_SYNC(ufsvfsp, saverror, in ufs_flush() [all …]
|
H A D | ufs_vnops.c | 307 struct ufsvfs *ufsvfsp; in ufs_read() local 328 ufsvfsp = ip->i_ufsvfs; in ufs_read() 329 error = ufs_lockfs_begin(ufsvfsp, &ulp, ULOCKFS_READ_MASK); in ufs_read() 352 TRANS_ISTRANS(ufsvfsp)) { in ufs_read() 354 TRANS_BEGIN_SYNC(ufsvfsp, TOP_READ_SYNC, TOP_READ_SIZE, in ufs_read() 357 TRANS_END_SYNC(ufsvfsp, error, TOP_READ_SYNC, in ufs_read() 373 TRANS_ISTRANS(ufsvfsp)) { in ufs_read() 374 TRANS_BEGIN_SYNC(ufsvfsp, TOP_READ_SYNC, TOP_READ_SIZE, in ufs_read() 385 TRANS_END_SYNC(ufsvfsp, error, TOP_READ_SYNC, in ufs_read() 437 struct ufsvfs *ufsvfsp; in ufs_write() local [all …]
|
H A D | ufs_thread.c | 242 ufs_delete(struct ufsvfs *ufsvfsp, struct inode *ip, int dolockfs) in ufs_delete() argument 252 struct ufs_q *delq = &ufsvfsp->vfs_delete; in ufs_delete() 253 struct ufs_delq_info *delq_info = &ufsvfsp->vfs_delete_info; in ufs_delete() 280 if (ufs_lockfs_begin(ufsvfsp, &ulp, ULOCKFS_DELETE_MASK)) in ufs_delete() 289 ulp = &ufsvfsp->vfs_ulockfs; in ufs_delete() 304 TRANS_BEGIN_CSYNC(ufsvfsp, issync, TOP_REMOVE, in ufs_delete() 332 if (!TRANS_ISTRANS(ufsvfsp)) { in ufs_delete() 344 TRANS_END_CSYNC(ufsvfsp, err, issync, in ufs_delete() 360 TRANS_BEGIN_ASYNC(ufsvfsp, TOP_IFREE, trans_size); in ufs_delete() 362 rw_enter(&ufsvfsp->vfs_dqrwlock, RW_READER); in ufs_delete() [all …]
|
H A D | lufs_top.c | 55 ufsvfs_t *ufsvfsp, in top_delta() argument 62 ml_unit_t *ul = ufsvfsp->vfs_log; in top_delta() 65 ASSERT(ufsvfsp->vfs_dev == ul->un_dev); in top_delta() 82 top_cancel(ufsvfs_t *ufsvfsp, offset_t mof, off_t nb, int flags) in top_cancel() argument 84 ml_unit_t *ul = ufsvfsp->vfs_log; in top_cancel() 87 ASSERT(ufsvfsp->vfs_dev == ul->un_dev); in top_cancel() 108 top_iscancel(ufsvfs_t *ufsvfsp, offset_t mof, off_t nb) in top_iscancel() argument 110 ml_unit_t *ul = ufsvfsp->vfs_log; in top_iscancel() 112 ASSERT(ufsvfsp->vfs_dev == ul->un_dev); in top_iscancel() 125 top_seterror(ufsvfs_t *ufsvfsp) in top_seterror() argument [all …]
|
H A D | quota.c | 160 struct ufsvfs *ufsvfsp, in getdiskquota() argument 173 ASSERT(RW_LOCK_HELD(&ufsvfsp->vfs_dqrwlock)); in getdiskquota() 175 dhp = &dqhead[DQHASH(uid, ufsvfsp)]; in getdiskquota() 180 if ((ufsvfsp->vfs_qflags & MQ_ENABLED) == 0 && !force) in getdiskquota() 182 qip = ufsvfsp->vfs_qinod; in getdiskquota() 184 return (ufs_fault(ufsvfsp->vfs_root, "getdiskquota: NULL qip")); in getdiskquota() 190 if (dqp->dq_uid != uid || dqp->dq_ufsvfsp != ufsvfsp) in getdiskquota() 198 if (dqp->dq_uid != uid || dqp->dq_ufsvfsp != ufsvfsp) { in getdiskquota() 247 dqp->dq_ufsvfsp = ufsvfsp; in getdiskquota() 369 struct ufsvfs *ufsvfsp; local [all …]
|
H A D | ufs_snap.c | 66 struct ufsvfs *ufsvfsp = VTOI(vp)->i_ufsvfs; in ufs_snap_create() local 67 struct fs *fs = ufsvfsp->vfs_fs; in ufs_snap_create() 80 if (secpolicy_fs_config(cr, ufsvfsp->vfs_vfs) != 0) in ufs_snap_create() 98 fiosnapp->backfilecount, &bfvpp, ufsvfsp); in ufs_snap_create() 144 if (ufsvfsp->vfs_snapshot) { in ufs_snap_create() 196 error = ufs_snap_find_candidates(snapid, ufsvfsp, chunksize); in ufs_snap_create() 206 ufsvfsp->vfs_snapshot = snapid; in ufs_snap_create() 232 struct ufsvfs *ufsvfsp) in ufs_snap_init_backfile() argument 256 if ((*vpp)->v_vfsp == ufsvfsp->vfs_vfs) { in ufs_snap_init_backfile() 281 ufs_snap_find_candidates(void *snapid, struct ufsvfs *ufsvfsp, int chunksize) in ufs_snap_find_candidates() argument [all …]
|
H A D | ufs_bmap.c | 208 ufsvfs_t *ufsvfsp = ip->i_ufsvfs; in bmap_read() local 209 struct fs *fs = ufsvfsp->vfs_fs; in bmap_read() 229 ufsvfsp->vfs_iotransz); in bmap_read() 233 nindirshift = ufsvfsp->vfs_nindirshift; in bmap_read() 234 nindiroffset = ufsvfsp->vfs_nindiroffset; in bmap_read() 266 bp = UFS_BREAD(ufsvfsp, in bmap_read() 289 0, ufsvfsp->vfs_iotransz); in bmap_read() 328 struct ufsvfs *ufsvfsp; in bmap_write() local 339 ufsvfsp = ip->i_ufsvfs; in bmap_write() 340 fs = ufsvfsp->vfs_bufp->b_un.b_fs; in bmap_write() [all …]
|
H A D | quota_ufs.c | 77 struct ufsvfs *ufsvfsp = ip->i_ufsvfs; in getinoquota() local 79 ASSERT(RW_LOCK_HELD(&ufsvfsp->vfs_dqrwlock)); in getinoquota() 84 if ((ufsvfsp->vfs_qflags & MQ_ENABLED) == 0) { in getinoquota() 91 if (ip == ufsvfsp->vfs_qinod) { in getinoquota() 103 if (getdiskquota((uid_t)ip->i_uid, ufsvfsp, 0, &xdqp)) { in getinoquota() 130 struct ufsvfs *ufsvfsp = ip->i_ufsvfs; in chkdq() local 148 RW_LOCK_HELD(&ufsvfsp->vfs_dqrwlock)); in chkdq() 185 if (expect_dq == NULL && ip != ufsvfsp->vfs_qinod) { in chkdq() 189 error = getdiskquota((uid_t)ip->i_uid, ufsvfsp, 0, in chkdq() 276 if ((ufsvfsp->vfs_qflags & MQ_ENABLED) == 0) { in chkdq() [all …]
|
H A D | ufs_extvnops.c | 72 struct ufsvfs *ufsvfsp = ip->i_ufsvfs; in ufs_rdwr_data() local 89 error = ufs_lockfs_begin_getpage(ufsvfsp, &ulp, segkmap, !iswrite, in ufs_rdwr_data() 97 fs = ufsvfsp->vfs_fs; in ufs_rdwr_data() 171 if (ufsvfsp->vfs_snapshot) { in ufs_rdwr_data() 172 fssnap_strategy(&ufsvfsp->vfs_snapshot, bp); in ufs_rdwr_data() 251 struct ufsvfs *ufsvfsp = ip->i_ufsvfs; in ufs_alloc_data() local 267 error = ufs_lockfs_begin_getpage(ufsvfsp, &ulp, segkmap, 0, &protp); in ufs_alloc_data() 279 TRANS_TRY_BEGIN_CSYNC(ufsvfsp, issync, TOP_GETPAGE, in ufs_alloc_data() 362 if (ufsvfsp->vfs_snapshot) { in ufs_alloc_data() 364 &ufsvfsp->vfs_snapshot, bp); in ufs_alloc_data() [all …]
|
H A D | ufs_inode.c | 335 ufs_alloc_inode(ufsvfs_t *ufsvfsp, ino_t ino) in ufs_alloc_inode() argument 348 ip->i_dev = ufsvfsp->vfs_dev; in ufs_alloc_inode() 349 ip->i_ufsvfs = ufsvfsp; in ufs_alloc_inode() 350 ip->i_devvp = ufsvfsp->vfs_devvp; in ufs_alloc_inode() 375 vp->v_vfsp = ufsvfsp->vfs_vfs; in ufs_alloc_inode() 457 struct ufsvfs *ufsvfsp; in ufs_iget_internal() local 526 ufsvfsp = (struct ufsvfs *)vfsp->vfs_data; in ufs_iget_internal() 527 fs = ufsvfsp->vfs_fs; in ufs_iget_internal() 529 ip = ufs_alloc_inode(ufsvfsp, ino); in ufs_iget_internal() 561 bp = UFS_BREAD(ufsvfsp, ip->i_dev, bno, (int)fs->fs_bsize); in ufs_iget_internal() [all …]
|
H A D | ufs_directio.c | 264 directio_start(struct ufsvfs *ufsvfsp, struct inode *ip, size_t nbytes, in directio_start() argument 317 ufsvfsp->vfs_iotstamp = ddi_get_lbolt(); in directio_start() 318 if (ufsvfsp->vfs_snapshot) in directio_start() 319 fssnap_strategy(&ufsvfsp->vfs_snapshot, bp); in directio_start() 358 struct ufsvfs *ufsvfsp = ip->i_ufsvfs; in ufs_directio_write() local 487 if (uio->uio_iovcnt != 1 || resid > ufsvfsp->vfs_ioclustsz) { in ufs_directio_write() 564 ASSERT(ufsvfsp->vfs_lfflags & UFS_LARGEFILES); in ufs_directio_write() 565 mutex_enter(&ufsvfsp->vfs_lock); in ufs_directio_write() 567 ufs_sbwrite(ufsvfsp); in ufs_directio_write() 568 mutex_exit(&ufsvfsp->vfs_lock); in ufs_directio_write() [all …]
|
H A D | lufs_thread.c | 254 log_roll_write_crb(ufsvfs_t *ufsvfsp, rollbuf_t *rbp) in log_roll_write_crb() argument 268 if (ufsvfsp->vfs_snapshot) { in log_roll_write_crb() 269 fssnap_strategy(&ufsvfsp->vfs_snapshot, bp); in log_roll_write_crb() 279 log_roll_write_bufs(ufsvfs_t *ufsvfsp, rollbuf_t *rbp) in log_roll_write_bufs() argument 313 if (ufsvfsp->vfs_snapshot) in log_roll_write_bufs() 314 fssnap_strategy(&ufsvfsp->vfs_snapshot, bp); in log_roll_write_bufs() 345 ufsvfs_t *ufsvfsp = ul->un_ufsvfs; in log_roll_write() local 381 log_roll_write_crb(ufsvfsp, rbp); in log_roll_write() 383 log_roll_write_bufs(ufsvfsp, rbp); in log_roll_write()
|
H A D | ufs_log.c | 86 ufsvfs_t *ufsvfsp = VTOI(vp)->i_ufsvfs; in ufs_fioislog() local 89 active = (ufsvfsp && ufsvfsp->vfs_log); in ufs_fioislog()
|
H A D | ufs_panic.c | 437 ufsvfs_t *ufsvfsp; in ufs_fault_v() local 450 ufsvfsp = (struct ufsvfs *)vp->v_vfsp->vfs_data; in ufs_fault_v() 461 need_vfslock = !MUTEX_HELD(&ufsvfsp->vfs_lock); in ufs_fault_v() 464 mutex_enter(&ufsvfsp->vfs_lock); in ufs_fault_v() 467 ufsvfsp->vfs_fs->fs_clean = FSBAD; in ufs_fault_v() 468 ASSERT(SEMA_HELD(&ufsvfsp->vfs_bufp->b_sem)); in ufs_fault_v() 469 ufsvfsp->vfs_bufp->b_flags &= in ufs_fault_v() 472 (void) bdev_strategy(ufsvfsp->vfs_bufp); in ufs_fault_v() 473 (void) biowait(ufsvfsp->vfs_bufp); in ufs_fault_v() 476 mutex_exit(&ufsvfsp->vfs_lock); in ufs_fault_v() [all …]
|
H A D | lufs_debug.c | 96 top_mataadd(ufsvfs_t *ufsvfsp, offset_t mof, off_t nb) in top_mataadd() argument 98 ml_unit_t *ul = ufsvfsp->vfs_log; in top_mataadd() 100 ASSERT(ufsvfsp->vfs_dev == ul->un_dev); in top_mataadd() 108 top_matadel(ufsvfs_t *ufsvfsp, offset_t mof, off_t nb) in top_matadel() argument 110 ml_unit_t *ul = ufsvfsp->vfs_log; in top_matadel() 112 ASSERT(ufsvfsp->vfs_dev == ul->un_dev); in top_matadel() 121 top_mataclr(ufsvfs_t *ufsvfsp) in top_mataclr() argument 123 ml_unit_t *ul = ufsvfsp->vfs_log; in top_mataclr() 125 ASSERT(ufsvfsp->vfs_dev == ul->un_dev); in top_mataclr()
|