Whamcloud - gitweb
LU-11193 llog: Do not write to read-only devices 57/33157/4
authorNathaniel Clark <nclark@whamcloud.com>
Thu, 13 Sep 2018 17:41:09 +0000 (13:41 -0400)
committerOleg Drokin <green@whamcloud.com>
Tue, 23 Oct 2018 05:16:01 +0000 (05:16 +0000)
commit12a695d5b2fea73ee5edb7a0a79d557c94cafa35
tree75ef2a3bc6008ccb9c0f21da5c3feeb9be2d4783
parente5753f64de77d56f5ab0f5b518a7b1315352aedd
LU-11193 llog: Do not write to read-only devices

Check if device is read-only before trying to start a transaction
on a devices.  Lustre snapshots are generally read-only.

When underlying device is read-only we check in the following places:
* llog_destroy, llog_write - return EROFS
* llog_open_create - on the create sized we return EROFS
* llog_cancel_rec - we return 0 which means success where 1 means
"success & log destroyed"

Test-Parameters: trivial testlist=sanity-lsnapshot mdtcount=4 mdscount=2 ostfilesystemtype=zfs mdtfilesystemtype=zfs
Signed-off-by: Nathaniel Clark <nclark@whamcloud.com>
Change-Id: Ia0083c57ceb589698b1422fec57e75aa6e68948a
Reviewed-on: https://review.whamcloud.com/33157
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/obdclass/llog.c