Simplify devfs_fsync(), by removing it. This might also be a minor
optimization, as vn_isdisk() needs to lock a global mutex.
Tested by: pho
Differential D9628
Simplify devfs_fsync(). trasz on Feb 16 2017, 11:02 AM. Authored by Tags None Referenced Files
Subscribers
Details Simplify devfs_fsync(), by removing it. This might also be a minor Tested by: pho
Diff Detail
Event TimelineComment Actions If doing this, you can simply point vop_fsync member of devfs_specops to vfs_stdfsync, without a need to create the trivial local wrapper. That said, I believe that the printouts done by the current variant are useful, and the panic is justified until UFS is fixed. Comment Actions The panic was changed into printf already, as it triggered every time, even when UFS or msdosfs could survive just fine. The warning - I kind of agree, it could be useful, but I don't think it's worth complicating the code just for that. Also, good point with the vector. I'll fix that. Comment Actions vop_stdfsync() handles these cases just fine, though the synchronous waiting code looks a bit odd since it only looks at the last bp in the bufobj's dirty chain for the error code, which seems like it would be wrong. TAILQ_FOREACH(bp, &bo->bo_dirty.bv_hd, b_bobufs) if ((error = bp->b_error) == 0) continue; should be TAILQ_FOREACH(bp, &bo->bo_dirty.bv_hd, b_bobufs) if ((error = bp->b_error) != 0) break; but that's I guess unrelated. |