Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 186444
b: refs/heads/master
c: 6a08ab8
h: refs/heads/master
v: v3
  • Loading branch information
Joern Engel committed Mar 5, 2010
1 parent 7e53f74 commit 24be86d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c6d3830140f1d56b07d8ab56a6e14ca3c492a39a
refs/heads/master: 6a08ab846cefc82a328cbf9abd96c2e58a6c3664
4 changes: 4 additions & 0 deletions trunk/fs/logfs/logfs_abi.h
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,10 @@ struct logfs_segment_header {

SIZE_CHECK(logfs_segment_header, LOGFS_SEGMENT_HEADERSIZE);

#define LOGFS_FEATURES_INCOMPAT (0ull)
#define LOGFS_FEATURES_RO_COMPAT (0ull)
#define LOGFS_FEATURES_COMPAT (0ull)

/**
* struct logfs_disk_super - on-medium superblock
*
Expand Down
10 changes: 8 additions & 2 deletions trunk/fs/logfs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ static int __logfs_read_sb(struct super_block *sb)
return 0;
}

static int logfs_read_sb(struct super_block *sb)
static int logfs_read_sb(struct super_block *sb, int read_only)
{
struct logfs_super *super = logfs_super(sb);
int ret;
Expand All @@ -460,6 +460,12 @@ static int logfs_read_sb(struct super_block *sb)
if (ret)
return ret;

if (super->s_feature_incompat & ~LOGFS_FEATURES_INCOMPAT)
return -EIO;
if ((super->s_feature_ro_compat & ~LOGFS_FEATURES_RO_COMPAT) &&
!read_only)
return -EIO;

mutex_init(&super->s_dirop_mutex);
mutex_init(&super->s_object_alias_mutex);
INIT_LIST_HEAD(&super->s_freeing_list);
Expand Down Expand Up @@ -555,7 +561,7 @@ int logfs_get_sb_device(struct file_system_type *type, int flags,
sb->s_op = &logfs_super_operations;
sb->s_flags = flags | MS_NOATIME;

err = logfs_read_sb(sb);
err = logfs_read_sb(sb, sb->s_flags & MS_RDONLY);
if (err)
goto err1;

Expand Down

0 comments on commit 24be86d

Please sign in to comment.