ext2_vnops.c (33935) | ext2_vnops.c (34961) |
---|---|
1/* 2 * modified for EXT2FS support in Lites 1.1 3 * 4 * Aug 1995, Godmar Back (gback@cs.utah.edu) 5 * University of Utah, Department of Computer Science 6 */ 7/* 8 * Copyright (c) 1982, 1986, 1989, 1993 --- 215 unchanged lines hidden (view full) --- 224#if DIAGNOSTIC 225 if (vp->v_dirtyblkhd.lh_first) { 226 vprint("ext2_fsync: dirty", vp); 227 goto loop; 228 } 229#endif 230 } 231 splx(s); | 1/* 2 * modified for EXT2FS support in Lites 1.1 3 * 4 * Aug 1995, Godmar Back (gback@cs.utah.edu) 5 * University of Utah, Department of Computer Science 6 */ 7/* 8 * Copyright (c) 1982, 1986, 1989, 1993 --- 215 unchanged lines hidden (view full) --- 224#if DIAGNOSTIC 225 if (vp->v_dirtyblkhd.lh_first) { 226 vprint("ext2_fsync: dirty", vp); 227 goto loop; 228 } 229#endif 230 } 231 splx(s); |
232 gettime(&tv); | 232 getmicrotime(&tv); |
233 return (UFS_UPDATE(ap->a_vp, &tv, &tv, ap->a_waitfor == MNT_WAIT)); 234} 235 236/* 237 * Mknod vnode call 238 */ 239/* ARGSUSED */ 240static int --- 108 unchanged lines hidden (view full) --- 349 } 350 if (ip->i_flags & (IMMUTABLE | APPEND)) { 351 VOP_ABORTOP(tdvp, cnp); 352 error = EPERM; 353 goto out1; 354 } 355 ip->i_nlink++; 356 ip->i_flag |= IN_CHANGE; | 233 return (UFS_UPDATE(ap->a_vp, &tv, &tv, ap->a_waitfor == MNT_WAIT)); 234} 235 236/* 237 * Mknod vnode call 238 */ 239/* ARGSUSED */ 240static int --- 108 unchanged lines hidden (view full) --- 349 } 350 if (ip->i_flags & (IMMUTABLE | APPEND)) { 351 VOP_ABORTOP(tdvp, cnp); 352 error = EPERM; 353 goto out1; 354 } 355 ip->i_nlink++; 356 ip->i_flag |= IN_CHANGE; |
357 gettime(&tv); | 357 getmicrotime(&tv); |
358 error = UFS_UPDATE(vp, &tv, &tv, 1); 359 if (!error) 360 error = ext2_direnter(ip, tdvp, cnp); 361 if (error) { 362 ip->i_nlink--; 363 ip->i_flag |= IN_CHANGE; 364 } 365 zfree(namei_zone, cnp->cn_pnbuf); --- 155 unchanged lines hidden (view full) --- 521 /* 522 * 1) Bump link count while we're moving stuff 523 * around. If we crash somewhere before 524 * completing our work, the link count 525 * may be wrong, but correctable. 526 */ 527 ip->i_nlink++; 528 ip->i_flag |= IN_CHANGE; | 358 error = UFS_UPDATE(vp, &tv, &tv, 1); 359 if (!error) 360 error = ext2_direnter(ip, tdvp, cnp); 361 if (error) { 362 ip->i_nlink--; 363 ip->i_flag |= IN_CHANGE; 364 } 365 zfree(namei_zone, cnp->cn_pnbuf); --- 155 unchanged lines hidden (view full) --- 521 /* 522 * 1) Bump link count while we're moving stuff 523 * around. If we crash somewhere before 524 * completing our work, the link count 525 * may be wrong, but correctable. 526 */ 527 ip->i_nlink++; 528 ip->i_flag |= IN_CHANGE; |
529 gettime(&tv); | 529 getmicrotime(&tv); |
530 if (error = UFS_UPDATE(fvp, &tv, &tv, 1)) { 531 VOP_UNLOCK(fvp, 0, p); 532 goto bad; 533 } 534 535 /* 536 * If ".." must be changed (ie the directory gets a new 537 * parent) then the source directory must not be in the --- 354 unchanged lines hidden (view full) --- 892#endif 893#endif 894 ip->i_flag |= IN_ACCESS | IN_CHANGE | IN_UPDATE; 895 ip->i_mode = dmode; 896 tvp->v_type = VDIR; /* Rest init'd in getnewvnode(). */ 897 ip->i_nlink = 2; 898 if (cnp->cn_flags & ISWHITEOUT) 899 ip->i_flags |= UF_OPAQUE; | 530 if (error = UFS_UPDATE(fvp, &tv, &tv, 1)) { 531 VOP_UNLOCK(fvp, 0, p); 532 goto bad; 533 } 534 535 /* 536 * If ".." must be changed (ie the directory gets a new 537 * parent) then the source directory must not be in the --- 354 unchanged lines hidden (view full) --- 892#endif 893#endif 894 ip->i_flag |= IN_ACCESS | IN_CHANGE | IN_UPDATE; 895 ip->i_mode = dmode; 896 tvp->v_type = VDIR; /* Rest init'd in getnewvnode(). */ 897 ip->i_nlink = 2; 898 if (cnp->cn_flags & ISWHITEOUT) 899 ip->i_flags |= UF_OPAQUE; |
900 gettime(&tv); | 900 getmicrotime(&tv); |
901 error = UFS_UPDATE(tvp, &tv, &tv, 1); 902 903 /* 904 * Bump link count in parent directory 905 * to reflect work done below. Should 906 * be done before reference is created 907 * so reparation is possible if we crash. 908 */ --- 264 unchanged lines hidden (view full) --- 1173 ip->i_mode &= ~ISGID; 1174 1175 if (cnp->cn_flags & ISWHITEOUT) 1176 ip->i_flags |= UF_OPAQUE; 1177 1178 /* 1179 * Make sure inode goes to disk before directory entry. 1180 */ | 901 error = UFS_UPDATE(tvp, &tv, &tv, 1); 902 903 /* 904 * Bump link count in parent directory 905 * to reflect work done below. Should 906 * be done before reference is created 907 * so reparation is possible if we crash. 908 */ --- 264 unchanged lines hidden (view full) --- 1173 ip->i_mode &= ~ISGID; 1174 1175 if (cnp->cn_flags & ISWHITEOUT) 1176 ip->i_flags |= UF_OPAQUE; 1177 1178 /* 1179 * Make sure inode goes to disk before directory entry. 1180 */ |
1181 gettime(&tv); | 1181 getmicrotime(&tv); |
1182 error = UFS_UPDATE(tvp, &tv, &tv, 1); 1183 if (error) 1184 goto bad; 1185 error = ext2_direnter(ip, dvp, cnp); 1186 if (error) 1187 goto bad; 1188 1189 if ((cnp->cn_flags & SAVESTART) == 0) --- 45 unchanged lines hidden --- | 1182 error = UFS_UPDATE(tvp, &tv, &tv, 1); 1183 if (error) 1184 goto bad; 1185 error = ext2_direnter(ip, dvp, cnp); 1186 if (error) 1187 goto bad; 1188 1189 if ((cnp->cn_flags & SAVESTART) == 0) --- 45 unchanged lines hidden --- |