[LU-9111] update osd-ldiskfs to not depend on dev_readonly patches Created: 11/Feb/17 Updated: 14/Feb/17 Resolved: 14/Feb/17 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | Lustre 2.10.0 |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major |
| Reporter: | Oleg Drokin | Assignee: | WC Triage |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||
| Rank (Obsolete): | 9223372036854775807 | ||||||||||||
| Description |
|
I am splitting this from Currently osd interface declares dt_ro (osd_ro) operation to mark a device read-only for failover purposes. In zfs case it's achieved internally, but for ldiskfs we are carrying a special patch to do it. In the past James Simmons came up with the approach of using make_request fault location that was vetted down because it also makes reads fail: https://review.whamcloud.com/#/c/6651/3 Since then apparently no better method appeared to make a similar fault only to fail writes. So I wonder if we can play some smart tricks to overcome this?
2. We might attempt to play some games on the actual underlying block device to render it readonly, like try to hijack the ->make_request_fn() function pointer, but I guess that's kind of shady. Any other good ideas I am missing? |
| Comments |
| Comment by Andreas Dilger [ 14/Feb/17 ] |
|
The dt_ro() method is only called from ioctl(OBD_IOC_SET_READONLY), which is itself only called from the lctl readonly command. The osd_ro() method for osd-ldiskfs only returns -EOPNOTSUPP if HAVE_DEV_SET_RDONLY is not set. This shouldn't be used for anything other than testing - normal unmount should be used for soft failover, and STONITH should be used for hard failover. |