linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Increase file size limit on FreeBSD UFS flavours
@ 2012-05-13 13:50 Vladimir 'φ-coder/phcoder' Serbinenko
  2012-05-17 23:10 ` Andrew Morton
  0 siblings, 1 reply; 3+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2012-05-13 13:50 UTC (permalink / raw)
  To: linux-fsdevel, linux-kernel; +Cc: Evgeniy Dushistov

[-- Attachment #1: Type: text/plain, Size: 916 bytes --]

Increase the file size limit on FreeBSD UFS flavours.

Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>

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;
 		


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 294 bytes --]

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] Increase file size limit on FreeBSD UFS flavours
  2012-05-13 13:50 [PATCH] Increase file size limit on FreeBSD UFS flavours Vladimir 'φ-coder/phcoder' Serbinenko
@ 2012-05-17 23:10 ` Andrew Morton
  2012-05-18  4:42   ` Vladimir 'φ-coder/phcoder' Serbinenko
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Morton @ 2012-05-17 23:10 UTC (permalink / raw)
  To: Vladimir 'φ-coder/phcoder' Serbinenko
  Cc: linux-fsdevel, linux-kernel, Evgeniy Dushistov

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

> Increase the file size limit on FreeBSD UFS flavours.
> 
> Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
> 
> 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?

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Increase file size limit on FreeBSD UFS flavours
  2012-05-17 23:10 ` Andrew Morton
@ 2012-05-18  4:42   ` Vladimir 'φ-coder/phcoder' Serbinenko
  0 siblings, 0 replies; 3+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2012-05-18  4:42 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-fsdevel, linux-kernel, Evgeniy Dushistov

[-- Attachment #1: Type: text/plain, Size: 1846 bytes --]

On 18.05.2012 01:10, Andrew Morton wrote:

> On Sun, 13 May 2012 15:50:40 +0200
> Vladimir '__-coder/phcoder' Serbinenko  <phcoder@gmail.com> wrote:
> 
>> Increase the file size limit on FreeBSD UFS flavours.
>>
>> Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
>>
>> 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


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 294 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-05-18  4:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-13 13:50 [PATCH] Increase file size limit on FreeBSD UFS flavours Vladimir 'φ-coder/phcoder' Serbinenko
2012-05-17 23:10 ` Andrew Morton
2012-05-18  4:42   ` Vladimir 'φ-coder/phcoder' Serbinenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).