Whamcloud - gitweb
LU-9074 llite: Stop file creation for ro bind mnt
While remounting the bind mount of lustre with read-only, vfs
sets MNT_READONLY in the mnt flags and does not make a call
to lustre. Hence, the change in mnt flags is not reflected in
lustre.
Therefore, file creation goes ahead in lookup operation of
lustre with LOOKUP_CREATE intent set and converted to IT_CREAT.
The fix is to disallow file creation by not setting IT_CREAT
intent when bind mnt pt is readonly and unsetting O_CREAT.
Added a test case to test that files are not created in ro
bind mount point. Files must be created after bind mount point
is converted from ro to rw.
Signed-off-by: Noopur Maheshwari <noopur.maheshwari@seagate.com>
Change-Id: Ic60fb18f539159715049515e264afdf51a00378e
Reviewed-on: https://review.whamcloud.com/25204
Reviewed-by: Andrew Perepechko <andrew.perepechko@seagate.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>