Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 206372
b: refs/heads/master
c: 89c0fd0
h: refs/heads/master
v: v3
  • Loading branch information
Ryusuke Konishi committed Jul 25, 2010
1 parent 7fe66bf commit 4a4c1f2
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 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: 6cda9fa2575ec0869fe77b0bdf295c0e51868cab
refs/heads/master: 89c0fd014d34d409a7b196667c2b9a4813b6c968
9 changes: 8 additions & 1 deletion trunk/fs/nilfs2/the_nilfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,7 @@ int init_nilfs(struct the_nilfs *nilfs, struct nilfs_sb_info *sbi, char *data)
goto out;
}

blocksize = sb_min_blocksize(sb, BLOCK_SIZE);
blocksize = sb_min_blocksize(sb, NILFS_MIN_BLOCK_SIZE);
if (!blocksize) {
printk(KERN_ERR "NILFS: unable to set blocksize\n");
err = -EINVAL;
Expand All @@ -690,6 +690,13 @@ int init_nilfs(struct the_nilfs *nilfs, struct nilfs_sb_info *sbi, char *data)
goto failed_sbh;

blocksize = BLOCK_SIZE << le32_to_cpu(sbp->s_log_block_size);
if (blocksize < NILFS_MIN_BLOCK_SIZE ||
blocksize > NILFS_MAX_BLOCK_SIZE) {
printk(KERN_ERR "NILFS: couldn't mount because of unsupported "
"filesystem blocksize %d\n", blocksize);
err = -EINVAL;
goto failed_sbh;
}
if (sb->s_blocksize != blocksize) {
int hw_blocksize = bdev_logical_block_size(sb->s_bdev);

Expand Down
6 changes: 6 additions & 0 deletions trunk/include/linux/nilfs2_fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,12 @@ struct nilfs_super_block {

#define NILFS_NAME_LEN 255

/*
* Block size limitations
*/
#define NILFS_MIN_BLOCK_SIZE 1024
#define NILFS_MAX_BLOCK_SIZE 65536

/*
* The new version of the directory entry. Since V0 structures are
* stored in intel byte order, and the name_len field could never be
Expand Down

0 comments on commit 4a4c1f2

Please sign in to comment.