Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Linux: Kernel

[PATCH] Increase file size limit on FreeBSD UFS flavours

 

 

Linux kernel RSS feed   Index | Next | Previous | View Threaded


phcoder at gmail

May 13, 2012, 6:50 AM

Post #1 of 3 (94 views)
Permalink
[PATCH] Increase file size limit on FreeBSD UFS flavours

Increase the file size limit on FreeBSD UFS flavours.

Signed-off-by: Vladimir Serbinenko <phcoder [at] gmail>

diff --git a/fs/ufs/super.c b/fs/ufs/super.c
index ac8e279..7e80a68 100644
--- a/fs/ufs/super.c
+++ b/fs/ufs/super.c
@@ -768,6 +768,7 @@ static int ufs_fill_super(struct super_block *sb, void *data, int silent)
uspi->s_fshift = 9;
uspi->s_sbsize = super_block_size = 1536;
uspi->s_sbbase = 0;
+ sb->s_maxbytes = MAX_LFS_FILESIZE;
flags |= UFS_DE_44BSD | UFS_UID_44BSD | UFS_ST_44BSD | UFS_CG_44BSD;
break;
case UFS_MOUNT_UFSTYPE_UFS2:
@@ -778,6 +779,7 @@ static int ufs_fill_super(struct super_block *sb, void *data, int silent)
uspi->s_fshift = 9;
uspi->s_sbsize = super_block_size = 1536;
uspi->s_sbbase = 0;
+ sb->s_maxbytes = MAX_LFS_FILESIZE;
flags |= UFS_TYPE_UFS2 | UFS_DE_44BSD | UFS_UID_44BSD | UFS_ST_44BSD | UFS_CG_44BSD;
break;
Attachments: signature.asc (0.29 KB)


akpm at linux-foundation

May 17, 2012, 4:10 PM

Post #2 of 3 (93 views)
Permalink
Re: [PATCH] Increase file size limit on FreeBSD UFS flavours [In reply to]

On Sun, 13 May 2012 15:50:40 +0200
Vladimir '__-coder/phcoder' Serbinenko <phcoder [at] gmail> wrote:

> Increase the file size limit on FreeBSD UFS flavours.
>
> Signed-off-by: Vladimir Serbinenko <phcoder [at] gmail>
>
> diff --git a/fs/ufs/super.c b/fs/ufs/super.c
> index ac8e279..7e80a68 100644
> --- a/fs/ufs/super.c
> +++ b/fs/ufs/super.c
> @@ -768,6 +768,7 @@ static int ufs_fill_super(struct super_block *sb, void *data, int silent)
> uspi->s_fshift = 9;
> uspi->s_sbsize = super_block_size = 1536;
> uspi->s_sbbase = 0;
> + sb->s_maxbytes = MAX_LFS_FILESIZE;
> flags |= UFS_DE_44BSD | UFS_UID_44BSD | UFS_ST_44BSD | UFS_CG_44BSD;
> break;
> case UFS_MOUNT_UFSTYPE_UFS2:
> @@ -778,6 +779,7 @@ static int ufs_fill_super(struct super_block *sb, void *data, int silent)
> uspi->s_fshift = 9;
> uspi->s_sbsize = super_block_size = 1536;
> uspi->s_sbbase = 0;
> + sb->s_maxbytes = MAX_LFS_FILESIZE;
> flags |= UFS_TYPE_UFS2 | UFS_DE_44BSD | UFS_UID_44BSD | UFS_ST_44BSD | UFS_CG_44BSD;
> break;
>

But MAX_NON_LFS exists for a reason. Before this change, the Linux UFS
implementation had never had to deal with >4G files (I assume).

Are you telling us that the fs has been thoroughly audited and tested
with large files and that it all worked OK with no other changes?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


phcoder at gmail

May 17, 2012, 9:42 PM

Post #3 of 3 (87 views)
Permalink
Re: [PATCH] Increase file size limit on FreeBSD UFS flavours [In reply to]

On 18.05.2012 01:10, Andrew Morton wrote:

> On Sun, 13 May 2012 15:50:40 +0200
> Vladimir '__-coder/phcoder' Serbinenko <phcoder [at] gmail> wrote:
>
>> Increase the file size limit on FreeBSD UFS flavours.
>>
>> Signed-off-by: Vladimir Serbinenko <phcoder [at] gmail>
>>
>> diff --git a/fs/ufs/super.c b/fs/ufs/super.c
>> index ac8e279..7e80a68 100644
>> --- a/fs/ufs/super.c
>> +++ b/fs/ufs/super.c
>> @@ -768,6 +768,7 @@ static int ufs_fill_super(struct super_block *sb, void *data, int silent)
>> uspi->s_fshift = 9;
>> uspi->s_sbsize = super_block_size = 1536;
>> uspi->s_sbbase = 0;
>> + sb->s_maxbytes = MAX_LFS_FILESIZE;
>> flags |= UFS_DE_44BSD | UFS_UID_44BSD | UFS_ST_44BSD | UFS_CG_44BSD;
>> break;
>> case UFS_MOUNT_UFSTYPE_UFS2:
>> @@ -778,6 +779,7 @@ static int ufs_fill_super(struct super_block *sb, void *data, int silent)
>> uspi->s_fshift = 9;
>> uspi->s_sbsize = super_block_size = 1536;
>> uspi->s_sbbase = 0;
>> + sb->s_maxbytes = MAX_LFS_FILESIZE;
>> flags |= UFS_TYPE_UFS2 | UFS_DE_44BSD | UFS_UID_44BSD | UFS_ST_44BSD | UFS_CG_44BSD;
>> break;
>>
>
> But MAX_NON_LFS exists for a reason. Before this change, the Linux UFS
> implementation had never had to deal with >4G files (I assume).
>
> Are you telling us that the fs has been thoroughly audited and tested
> with large files and that it all worked OK with no other changes?
>

The comment indicated that this was simply because the author wasn't
sure as to which UFS flavours actually supported big files. I've tested
it only by creating big file, unmounting the filesystem and then
comparing the read against another UFS implementation (the one in GRUB)
and obtaining perfect match. I haven't done any thorough audit.


--
Regards
Vladimir 'φ-coder/phcoder' Serbinenko
Attachments: signature.asc (0.29 KB)

Linux kernel RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.