Skip to content

Commit

Permalink
fs/ufs: recognize Solaris-specific file system state
Browse files Browse the repository at this point in the history
Recent releases of Solaris set the fs_clean state of an unmounted UFS file
system as FSLOG ("logging fs").  However, the Linux kernel currently does
not recognize the value which represents this state.  Thus, attempting to
mount such a file system rw produces the message

kernel: ufs_read_super: can't grok fs_clean 0xfffffffd

and the file system is mounted read-only.  This patch makes the kernel
recognize that value.

Signed-off-by: Alex Viskovatoff <[email protected]>
Cc: Evgeniy Dushistov <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Alex Viskovatoff authored and torvalds committed Mar 12, 2010
1 parent d7d4d84 commit b3a0fd4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions fs/ufs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -1016,6 +1016,9 @@ static int ufs_fill_super(struct super_block *sb, void *data, int silent)
case UFS_FSSTABLE:
UFSD("fs is stable\n");
break;
case UFS_FSLOG:
UFSD("fs is logging fs\n");
break;
case UFS_FSOSF1:
UFSD("fs is DEC OSF/1\n");
break;
Expand Down
6 changes: 6 additions & 0 deletions fs/ufs/ufs_fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,13 +138,19 @@ typedef __u16 __bitwise __fs16;

#define UFS_USEEFT ((__u16)65535)

/* fs_clean values */
#define UFS_FSOK 0x7c269d38
#define UFS_FSACTIVE ((__s8)0x00)
#define UFS_FSCLEAN ((__s8)0x01)
#define UFS_FSSTABLE ((__s8)0x02)
#define UFS_FSOSF1 ((__s8)0x03) /* is this correct for DEC OSF/1? */
#define UFS_FSBAD ((__s8)0xff)

/* Solaris-specific fs_clean values */
#define UFS_FSSUSPEND ((__s8)0xfe) /* temporarily suspended */
#define UFS_FSLOG ((__s8)0xfd) /* logging fs */
#define UFS_FSFIX ((__s8)0xfc) /* being repaired while mounted */

/* From here to next blank line, s_flags for ufs_sb_info */
/* directory entry encoding */
#define UFS_DE_MASK 0x00000010 /* mask for the following */
Expand Down

0 comments on commit b3a0fd4

Please sign in to comment.