Changeset View
Changeset View
Standalone View
Standalone View
sys/ufs/ffs/ffs_inode.c
Show First 20 Lines • Show All 126 Lines • ▼ Show 20 Lines | ffs_update(vp, waitfor) | ||||
* synchronous writes of the inode. Since the inode will be locked | * synchronous writes of the inode. Since the inode will be locked | ||||
* for the duration of the I/O that writes it to disk, no fsync() | * for the duration of the I/O that writes it to disk, no fsync() | ||||
* or fsyncdata() will be able to run before the on-disk inode | * or fsyncdata() will be able to run before the on-disk inode | ||||
* is complete. | * is complete. | ||||
*/ | */ | ||||
if (waitfor) | if (waitfor) | ||||
ip->i_flag &= ~(IN_SIZEMOD | IN_IBLKDATA); | ip->i_flag &= ~(IN_SIZEMOD | IN_IBLKDATA); | ||||
fs = ITOFS(ip); | fs = ITOFS(ip); | ||||
if (fs->fs_ronly && ITOUMP(ip)->um_fsckpid == 0) | if (fs->fs_ronly) | ||||
return (0); | return (0); | ||||
/* | /* | ||||
* If we are updating a snapshot and another process is currently | * If we are updating a snapshot and another process is currently | ||||
* writing the buffer containing the inode for this snapshot then | * writing the buffer containing the inode for this snapshot then | ||||
* a deadlock can occur when it tries to check the snapshot to see | * a deadlock can occur when it tries to check the snapshot to see | ||||
* if that block needs to be copied. Thus when updating a snapshot | * if that block needs to be copied. Thus when updating a snapshot | ||||
* we check to see if the buffer is already locked, and if it is | * we check to see if the buffer is already locked, and if it is | ||||
* we drop the snapshot lock until the buffer has been written | * we drop the snapshot lock until the buffer has been written | ||||
▲ Show 20 Lines • Show All 682 Lines • Show Last 20 Lines |