diff options
-rw-r--r-- | fs/udf/super.c | 43 |
1 files changed, 4 insertions, 39 deletions
diff --git a/fs/udf/super.c b/fs/udf/super.c index f3ac4abfc946..3723f04c0799 100644 --- a/fs/udf/super.c +++ b/fs/udf/super.c | |||
@@ -587,44 +587,6 @@ static int udf_remount_fs(struct super_block *sb, int *flags, char *options) | |||
587 | return 0; | 587 | return 0; |
588 | } | 588 | } |
589 | 589 | ||
590 | /* | ||
591 | * udf_set_blocksize | ||
592 | * | ||
593 | * PURPOSE | ||
594 | * Set the block size to be used in all transfers. | ||
595 | * | ||
596 | * DESCRIPTION | ||
597 | * To allow room for a DMA transfer, it is best to guess big when unsure. | ||
598 | * This routine picks 2048 bytes as the blocksize when guessing. This | ||
599 | * should be adequate until devices with larger block sizes become common. | ||
600 | * | ||
601 | * Note that the Linux kernel can currently only deal with blocksizes of | ||
602 | * 512, 1024, 2048, 4096, and 8192 bytes. | ||
603 | * | ||
604 | * PRE-CONDITIONS | ||
605 | * sb Pointer to _locked_ superblock. | ||
606 | * | ||
607 | * POST-CONDITIONS | ||
608 | * sb->s_blocksize Blocksize. | ||
609 | * sb->s_blocksize_bits log2 of blocksize. | ||
610 | * <return> 0 Blocksize is valid. | ||
611 | * <return> 1 Blocksize is invalid. | ||
612 | * | ||
613 | * HISTORY | ||
614 | * July 1, 1997 - Andrew E. Mileski | ||
615 | * Written, tested, and released. | ||
616 | */ | ||
617 | static int udf_set_blocksize(struct super_block *sb, int bsize) | ||
618 | { | ||
619 | if (!sb_min_blocksize(sb, bsize)) { | ||
620 | udf_debug("Bad block size (%d)\n", bsize); | ||
621 | printk(KERN_ERR "udf: bad block size (%d)\n", bsize); | ||
622 | return 0; | ||
623 | } | ||
624 | |||
625 | return sb->s_blocksize; | ||
626 | } | ||
627 | |||
628 | static int udf_vrs(struct super_block *sb, int silent) | 590 | static int udf_vrs(struct super_block *sb, int silent) |
629 | { | 591 | { |
630 | struct volStructDesc *vsd = NULL; | 592 | struct volStructDesc *vsd = NULL; |
@@ -1776,8 +1738,11 @@ static int udf_fill_super(struct super_block *sb, void *options, int silent) | |||
1776 | sbi->s_nls_map = uopt.nls_map; | 1738 | sbi->s_nls_map = uopt.nls_map; |
1777 | 1739 | ||
1778 | /* Set the block size for all transfers */ | 1740 | /* Set the block size for all transfers */ |
1779 | if (!udf_set_blocksize(sb, uopt.blocksize)) | 1741 | if (!sb_min_blocksize(sb, uopt.blocksize)) { |
1742 | udf_debug("Bad block size (%d)\n", uopt.blocksize); | ||
1743 | printk(KERN_ERR "udf: bad block size (%d)\n", uopt.blocksize); | ||
1780 | goto error_out; | 1744 | goto error_out; |
1745 | } | ||
1781 | 1746 | ||
1782 | if (uopt.session == 0xFFFFFFFF) | 1747 | if (uopt.session == 0xFFFFFFFF) |
1783 | sbi->s_session = udf_get_last_session(sb); | 1748 | sbi->s_session = udf_get_last_session(sb); |