piaojun
025bcbde36
ocfs2: return -EROFS to mount.ocfs2 if inode block is invalid
...
If metadata is corrupted such as 'invalid inode block', we will get
failed by calling 'mount()' and then set filesystem readonly as below:
ocfs2_mount
ocfs2_initialize_super
ocfs2_init_global_system_inodes
ocfs2_iget
ocfs2_read_locked_inode
ocfs2_validate_inode_block
ocfs2_error
ocfs2_handle_error
ocfs2_set_ro_flag(osb, 0); // set readonly
In this situation we need return -EROFS to 'mount.ocfs2', so that user
can fix it by fsck. And then mount again. In addition, 'mount.ocfs2'
should be updated correspondingly as it only return 1 for all errno.
And I will post a patch for 'mount.ocfs2' too.
Link: http://lkml.kernel.org/r/5A4302FA.2010606@huawei.com
Signed-off-by: Jun Piao <piaojun@huawei.com>
Reviewed-by: Alex Chen <alex.chen@huawei.com>
Reviewed-by: Joseph Qi <jiangqi903@gmail.com>
Reviewed-by: Changwei Ge <ge.changwei@h3c.com>
Reviewed-by: Gang He <ghe@suse.com>
Cc: Mark Fasheh <mfasheh@versity.com>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Junxiao Bi <junxiao.bi@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2018-01-31 17:18:35 -08:00
..
cluster
ocfs2/cluster: close a race that fence can't be triggered
2018-01-31 17:18:35 -08:00
dlm
fs/ocfs2/dlm/dlmmaster.c: clean up dead code
2018-01-31 17:18:34 -08:00
dlmfs
fs: annotate ->poll() instances
2017-11-27 16:20:05 -05:00
acl.c
ocfs2: make ocfs2_set_acl() static
2017-09-06 17:27:24 -07:00
acl.h
ocfs2: make ocfs2_set_acl() static
2017-09-06 17:27:24 -07:00
alloc.c
ocfs2: cleanup unused func declaration and assignment
2017-11-15 18:21:01 -08:00
alloc.h
ocfs2: clean up some dead code
2017-09-06 17:27:24 -07:00
aops.c
ocfs2: ip_alloc_sem should be taken in ocfs2_get_block()
2017-11-15 18:21:01 -08:00
aops.h
ocfs2: clean up unused 'page' parameter in ocfs2_write_end_nolock()
2016-12-12 18:55:06 -08:00
blockcheck.c
blockcheck.h
buffer_head_io.c
block,fs: untangle fs.h and blk_types.h
2016-11-01 09:43:26 -06:00
buffer_head_io.h
ocfs2: clean up some unused function declarations
2017-11-15 18:21:01 -08:00
dcache.c
dcache.h
dir.c
ocfs2: convert to new i_version API
2018-01-29 06:42:21 -05:00
dir.h
dlmglue.c
ocfs2: fix deadlock caused by recursive locking in xattr
2017-06-23 16:15:55 -07:00
dlmglue.h
ocfs2/dlmglue: prepare tracking logic to avoid recursive cluster lock
2017-02-22 16:41:27 -08:00
export.c
ocfs2: Use ERR_CAST() to avoid cross-structure cast
2017-05-28 10:11:49 -07:00
export.h
extent_map.c
extent_map.h
file.c
Rename superblock flags (MS_xyz -> SB_xyz)
2017-11-27 13:05:09 -08:00
file.h
statx: Add a system call to make enhanced file info available
2017-03-02 20:51:15 -05:00
filecheck.c
Pass mode to wait_on_atomic_t() action funcs and provide default actions
2017-11-13 15:38:16 +00:00
filecheck.h
ocfs2: sysfile interfaces for online file check
2016-03-22 15:36:02 -07:00
heartbeat.c
heartbeat.h
inode.c
ocfs2: convert to new i_version API
2018-01-29 06:42:21 -05:00
inode.h
ocfs2: convert inode refcount test to a helper
2016-12-10 12:39:45 -08:00
ioctl.c
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
ioctl.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
journal.c
ocfs2: clean up some dead code
2017-09-06 17:27:24 -07:00
journal.h
jbd2: add support for avoiding data writes during transaction commits
2016-04-24 00:56:07 -04:00
Kconfig
localalloc.c
ocfs2: fix occurring deadlock by changing ocfs2_wq from global to local
2016-03-25 16:37:42 -07:00
localalloc.h
locks.c
ocfs2: fix flock panic issue
2015-12-29 17:45:49 -08:00
locks.h
Makefile
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
mmap.c
mm, fs: reduce fault, page_mkwrite, and pfn_mkwrite to take only vmf
2017-02-24 17:46:54 -08:00
mmap.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
move_extents.c
ocfs2: clean up some dead code
2017-09-06 17:27:24 -07:00
move_extents.h
namei.c
ocfs2: convert to new i_version API
2018-01-29 06:42:21 -05:00
namei.h
ocfs1_fs_compat.h
ocfs2.h
ocfs2: clean up some dead code
2017-09-06 17:27:24 -07:00
ocfs2_fs.h
ocfs2: use magic.h
2017-07-06 16:24:30 -07:00
ocfs2_ioctl.h
ocfs2_lockid.h
ocfs2_lockingver.h
ocfs2_trace.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
quota.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
quota_global.c
ocfs2: convert to new i_version API
2018-01-29 06:42:21 -05:00
quota_local.c
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
2017-11-02 11:10:55 +01:00
refcounttree.c
ocfs2: clean up some dead code
2017-09-06 17:27:24 -07:00
refcounttree.h
ocfs2: implement the VFS clone_range, copy_range, and dedupe_range features
2016-12-10 12:39:45 -08:00
reservations.c
reservations.h
resize.c
ocfs2: solve a problem of crossing the boundary in updating backups
2016-03-25 16:37:42 -07:00
resize.h
slot_map.c
ocfs2: clean up an unneeded goto in ocfs2_put_slot()
2016-05-19 19:12:14 -07:00
slot_map.h
stack_o2cb.c
stack_user.c
Replace <asm/uaccess.h> with <linux/uaccess.h> globally
2016-12-24 11:46:01 -08:00
stackglue.c
ocfs2: constify attribute_group structures
2017-07-06 16:24:30 -07:00
stackglue.h
ocfs2: fix crash caused by stale lvb with fsdlm plugin
2017-01-10 18:31:54 -08:00
suballoc.c
ocfs2: clean dead code in suballoc.c
2018-01-31 17:18:35 -08:00
suballoc.h
super.c
ocfs2: return -EROFS to mount.ocfs2 if inode block is invalid
2018-01-31 17:18:35 -08:00
super.h
ocfs2: remove unused declaration ocfs2_publish_get_mount_state()
2017-11-15 18:21:01 -08:00
symlink.c
vfs: remove ".readlink = generic_readlink" assignments
2016-12-09 16:45:04 +01:00
symlink.h
sysfile.c
sysfile.h
uptodate.c
uptodate.h
xattr.c
ocfs2: use the OCFS2_XATTR_ROOT_SIZE macro in ocfs2_reflink_xattr_header()
2018-01-31 17:18:35 -08:00
xattr.h
ocfs2: fix posix_acl_create deadlock
2016-05-12 15:52:50 -07:00