Repository navigation
Fix zfs_open() to skip zil_async_to_sync() for the snapshot - #18091
Conversation
|
@behlendorf Actually, we need to change zfs_close() as well to prevent decrement z_sync_cnt for snapshot. |
Fix zfs_open() to skip zil_async_to_sync() for the snapshot, as it won't have any transactions. zfsvfs->z_log is NULL for the snapshot. Signed-off-by: Jitendra Patidar
0bde55c to
aad09a2
Compare
|
While I agree that this code should not make much sense for snapshots, I don't see here an explanation of why |
Following code in zfs_domount() doesn’t initialise zfsvfs->z_log for the snapshot. |
amotin
left a comment
There was a problem hiding this comment.
Hmm. OK. Though I wonder whether snapshots really need to be that special...
Fix zfs_open() to skip zil_async_to_sync() for the snapshot, as it won't have any transactions. zfsvfs->z_log is NULL for the snapshot. Reviewed-by: Brian BehlendorfReviewed-by: Alexander Motin Signed-off-by: Jitendra Patidar Closes openzfs#18091
Fix zfs_open() to skip zil_async_to_sync() for the snapshot, as it won't have any transactions. zfsvfs->z_log is NULL for the snapshot. Reviewed-by: Brian BehlendorfReviewed-by: Alexander Motin Signed-off-by: Jitendra Patidar Closes openzfs#18091
Fix zfs_open() to skip zil_async_to_sync() for the snapshot, as it won't have any transactions. zfsvfs->z_log is NULL for the snapshot. Reviewed-by: Brian BehlendorfReviewed-by: Alexander Motin Signed-off-by: Jitendra Patidar Closes openzfs#18091
Fix zfs_open() to skip zil_async_to_sync() for the snapshot, as it won't have any transactions. zfsvfs->z_log is NULL for the snapshot. Reviewed-by: Brian BehlendorfReviewed-by: Alexander Motin Signed-off-by: Jitendra Patidar Closes openzfs#18091
Fix zfs_open() to skip zil_async_to_sync() for the snapshot, as it won't have any transactions. zfsvfs->z_log is NULL for the snapshot. Reviewed-by: Brian BehlendorfReviewed-by: Alexander Motin Signed-off-by: Jitendra Patidar Closes openzfs#18091
Fix zfs_open() to skip zil_async_to_sync() for the snapshot, as it won't have any transactions. zfsvfs->z_log is NULL for the snapshot. Reviewed-by: Brian BehlendorfReviewed-by: Alexander Motin Signed-off-by: Jitendra Patidar Closes #18091
Fix zfs_open() to skip zil_async_to_sync() for the snapshot, as it won't have any transactions. zfsvfs->z_log is NULL for the snapshot. Reviewed-by: Brian BehlendorfReviewed-by: Alexander Motin Signed-off-by: Jitendra Patidar Closes openzfs#18091
Fix zfs_open() to skip zil_async_to_sync() for the snapshot, as it won't have any transactions. zfsvfs->z_log is NULL for the snapshot. Reviewed-by: Brian BehlendorfReviewed-by: Alexander Motin Signed-off-by: Jitendra Patidar Closes openzfs#18091
Fix zfs_open() to skip zil_async_to_sync() for the snapshot, as it won't have any transactions. zfsvfs->z_log is NULL for the snapshot. Reviewed-by: Brian BehlendorfReviewed-by: Alexander Motin Signed-off-by: Jitendra Patidar Closes openzfs#18091 Upstream: 2301755 Ported-by: Pavel Snajdr Porting-notes: - Clean cherry-pick.
Fix zfs_open() to skip zil_async_to_sync() for the snapshot, as it won't have any transactions. zfsvfs->z_log is NULL for the snapshot.
Motivation and Context
zfs_open()->zil_async_to_sync() gets kernel panic due to NULL pointer reference for the snapshot while referring zilog->zl_spa;
Description
How Has This Been Tested?
Opening a file on snapshot "/.zfs/snapshot/" wiht O_SYNC flag hits a panic.
Validated a fix with same steps.
Types of changes
Checklist:
Signed-off-by.