Whamcloud - gitweb
LU-8900 snapshot: simulate readonly device 67/24267/15
authorFan Yong <fan.yong@intel.com>
Fri, 4 Nov 2016 12:10:12 +0000 (20:10 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Thu, 23 Mar 2017 01:38:57 +0000 (01:38 +0000)
commit4c90aef2f0712d8da720f6a66cd09b88df7d0573
tree21440ffcb1d55989e37f74da161c31cf3234f839
parent61718da8ba068fdc093da464fc1097c6771079eb
LU-8900 snapshot: simulate readonly device

Introduce new server-side mount option: rdonly_dev. Under the
device readonly mode, the Lustre kernel threads that may cause
system modification, such as lfsck, scrub, osp_precreate_thread,
osp_sync_thread, and so on, will be disabled when mount. And the
system modification for recovery and client connect/disconnect,
will be ignored also.

On the other hand, if the server is mounted as "rdonly_dev", then
the client must specify "-o ro" option when mount; otherwise, it
will get -EACCES.

Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: Iafc02bf53c41b9d7f08120ba7639b91ae527bbbc
Reviewed-on: https://review.whamcloud.com/24267
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
43 files changed:
lustre/fid/fid_handler.c
lustre/fid/fid_store.c
lustre/fld/fld_index.c
lustre/include/dt_object.h
lustre/include/lu_target.h
lustre/include/lustre_disk.h
lustre/include/lustre_net.h
lustre/ldlm/ldlm_lib.c
lustre/lfsck/lfsck_lib.c
lustre/lod/lod_dev.c
lustre/mdd/mdd_device.c
lustre/mdt/mdt_coordinator.c
lustre/mdt/mdt_handler.c
lustre/mdt/mdt_hsm_cdt_client.c
lustre/mdt/mdt_internal.h
lustre/mdt/mdt_open.c
lustre/mgc/mgc_request.c
lustre/mgs/mgs_llog.c
lustre/mgs/mgs_nids.c
lustre/obdclass/obd_mount.c
lustre/ofd/ofd_dev.c
lustre/ofd/ofd_fs.c
lustre/ofd/ofd_obd.c
lustre/osd-ldiskfs/osd_handler.c
lustre/osd-ldiskfs/osd_scrub.c
lustre/osd-zfs/osd_handler.c
lustre/osd-zfs/osd_index.c
lustre/osd-zfs/osd_object.c
lustre/osd-zfs/osd_oi.c
lustre/osp/osp_dev.c
lustre/osp/osp_precreate.c
lustre/osp/osp_sync.c
lustre/ptlrpc/nodemap_storage.c
lustre/quota/qmt_dev.c
lustre/quota/qsd_handler.c
lustre/quota/qsd_lib.c
lustre/quota/qsd_reint.c
lustre/target/out_handler.c
lustre/target/tgt_lastrcvd.c
lustre/target/update_trans.c
lustre/tests/sanity.sh
lustre/tests/test-framework.sh
lustre/utils/mount_utils_zfs.c