All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] befs (1/5): LBD support
@ 2004-05-13 18:32 Sergey S. Kostyliov
  2004-05-14  2:16 ` Andrew Morton
  2004-05-14 15:22 ` Will Dyson
  0 siblings, 2 replies; 8+ messages in thread
From: Sergey S. Kostyliov @ 2004-05-13 18:32 UTC (permalink / raw)
  To: linux-kernel; +Cc: Will Dyson

LBD patch merged long time ago, so it is safe to pass u64 block
numbers to sb_bread() when sector_t is large enough.

===== fs/befs/linuxvfs.c 1.17 vs edited =====
--- 1.17/fs/befs/linuxvfs.c	Thu Mar  4 18:03:10 2004
+++ edited/fs/befs/linuxvfs.c	Thu May 13 21:23:04 2004
@@ -856,6 +856,13 @@
 	if (befs_check_sb(sb) != BEFS_OK)
 		goto unaquire_priv_sbp;
 
+	if( befs_sb->num_blocks > ~((sector_t)0) ) {
+		befs_error(sb, "blocks count: %Lu "
+			"is larger than the host can use",
+			befs_sb->num_blocks);
+		goto unaquire_priv_sbp;
+	}
+
 	/*
 	 * set up enough so that it can read an inode
 	 * Fill in kernel superblock fields from private sb
===== fs/befs/befs.h 1.1 vs edited =====
--- 1.1/fs/befs/befs.h	Tue Oct 22 18:39:38 2002
+++ edited/fs/befs/befs.h	Thu May 13 21:22:53 2004
@@ -14,10 +14,7 @@
 #define BEFS_VERSION "0.9.3"
 
 
-/* Sector_t makes this sillyness obsolete */
 typedef u64 befs_blocknr_t;
-typedef u32 vfs_blocknr_t;
-
 /*
  * BeFS in memory structures
  */
===== fs/befs/io.c 1.1 vs edited =====
--- 1.1/fs/befs/io.c	Tue Oct 22 18:39:38 2002
+++ edited/fs/befs/io.c	Thu May 13 21:22:53 2004
@@ -28,7 +28,6 @@
 {
 	struct buffer_head *bh = NULL;
 	befs_blocknr_t block = 0;
-	vfs_blocknr_t vfs_block = 0;
 	befs_sb_info *befs_sb = BEFS_SB(sb);
 
 	befs_debug(sb, "---> Enter befs_read_iaddr() "
@@ -42,17 +41,10 @@
 	}
 
 	block = iaddr2blockno(sb, &iaddr);
-	vfs_block = (vfs_blocknr_t) block;
-
-	if (vfs_block != block) {
-		befs_error(sb, "Error converting to host blocknr_t. %Lu "
-			   "is larger than the host can use", block);
-		goto error;
-	}
 
 	befs_debug(sb, "befs_read_iaddr: offset = %lu", block);
 
-	bh = sb_bread(sb, vfs_block);
+	bh = sb_bread(sb, block);
 
 	if (bh == NULL) {
 		befs_error(sb, "Failed to read block %lu", block);
@@ -71,20 +63,13 @@
 befs_bread(struct super_block *sb, befs_blocknr_t block)
 {
 	struct buffer_head *bh = NULL;
-	vfs_blocknr_t vfs_block = (vfs_blocknr_t) block;
 
 	befs_debug(sb, "---> Enter befs_read() %Lu", block);
 
-	if (vfs_block != block) {
-		befs_error(sb, "Error converting to host blocknr_t. %Lu "
-			   "is larger than the host can use", block);
-		goto error;
-	}
-
-	bh = sb_bread(sb, vfs_block);
+	bh = sb_bread(sb, block);
 
 	if (bh == NULL) {
-		befs_error(sb, "Failed to read block %lu", vfs_block);
+		befs_error(sb, "Failed to read block %lu", block);
 		goto error;
 	}
 

-- 
                   Best regards,
                   Sergey S. Kostyliov <rathamahata@php4.ru>
                   Public PGP key: http://sysadminday.org.ru/rathamahata.asc


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

* Re: [PATCH] befs (1/5): LBD support
  2004-05-13 18:32 [PATCH] befs (1/5): LBD support Sergey S. Kostyliov
@ 2004-05-14  2:16 ` Andrew Morton
  2004-05-14 13:00   ` Sergey S. Kostyliov
  2004-05-14 15:22 ` Will Dyson
  1 sibling, 1 reply; 8+ messages in thread
From: Andrew Morton @ 2004-05-14  2:16 UTC (permalink / raw)
  To: Sergey S. Kostyliov; +Cc: linux-kernel, will_dyson

"Sergey S. Kostyliov" <rathamahata@php4.ru> wrote:
>
> fs/befs/linuxvfs.c

Wow, BeFS maintenance.

Are you regularly testing BeFS?  If so, do you think it still deserves to
be labelled "experimental"?

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

* Re: [PATCH] befs (1/5): LBD support
  2004-05-14  2:16 ` Andrew Morton
@ 2004-05-14 13:00   ` Sergey S. Kostyliov
  0 siblings, 0 replies; 8+ messages in thread
From: Sergey S. Kostyliov @ 2004-05-14 13:00 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, will_dyson

On Friday 14 May 2004 06:16, Andrew Morton wrote:
> "Sergey S. Kostyliov" <rathamahata@php4.ru> wrote:
> >
> > fs/befs/linuxvfs.c
> 
> Wow, BeFS maintenance.
> 
> Are you regularly testing BeFS?  If so, do you think it still deserves to
> be labelled "experimental"?

Yes, I'm trying to test BeFS regularly.
>From my experience the current read only driver is fairly stable.

> 

-- 
                   Best regards,
                   Sergey S. Kostyliov <rathamahata@php4.ru>
                   Public PGP key: http://sysadminday.org.ru/rathamahata.asc

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

* Re: [PATCH] befs (1/5): LBD support
  2004-05-13 18:32 [PATCH] befs (1/5): LBD support Sergey S. Kostyliov
  2004-05-14  2:16 ` Andrew Morton
@ 2004-05-14 15:22 ` Will Dyson
  2004-05-14 16:09   ` Sergey S. Kostyliov
  1 sibling, 1 reply; 8+ messages in thread
From: Will Dyson @ 2004-05-14 15:22 UTC (permalink / raw)
  To: Sergey S. Kostyliov; +Cc: linux-kernel

Sergey S. Kostyliov wrote:
> LBD patch merged long time ago, so it is safe to pass u64 block
> numbers to sb_bread() when sector_t is large enough.

Nice. I haven't mounted any of my BeFS volumes in quite some months now. 
  Are you interested in taking over official maintainership?

-- 
Will Dyson
"Back off man, I'm a scientist!" -Dr. Peter Venkman

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

* Re: [PATCH] befs (1/5): LBD support
  2004-05-14 15:22 ` Will Dyson
@ 2004-05-14 16:09   ` Sergey S. Kostyliov
  2004-05-14 16:33     ` Will Dyson
  2004-05-14 16:33     ` Jörn Engel
  0 siblings, 2 replies; 8+ messages in thread
From: Sergey S. Kostyliov @ 2004-05-14 16:09 UTC (permalink / raw)
  To: Will Dyson; +Cc: linux-kernel

Hello Will,

On Friday 14 May 2004 19:22, Will Dyson wrote:
> Sergey S. Kostyliov wrote:
> > LBD patch merged long time ago, so it is safe to pass u64 block
> > numbers to sb_bread() when sector_t is large enough.
> 
> Nice. I haven't mounted any of my BeFS volumes in quite some months now. 
>   Are you interested in taking over official maintainership?
>

Yes, I am interested. How do you like this patch?

===== Documentation/filesystems/befs.txt 1.2 vs edited =====
--- 1.2/Documentation/filesystems/befs.txt	Tue Apr  1 03:55:42 2003
+++ edited/Documentation/filesystems/befs.txt	Fri May 14 20:00:47 2004
@@ -17,8 +17,8 @@
 
 AUTHOR
 =====
-Current maintainer: Will Dyson <will_dyson@pobox.com>
-Has been working on the code since Aug 13, 2001. See the changelog for
+The largest part of the code written by Will Dyson <will_dyson@pobox.com>
+He has been working on the code since Aug 13, 2001. See the changelog for
 details.
 
 Original Author: Makoto Kato <m_kato@ga2.so-net.ne.jp>
@@ -26,6 +26,8 @@
 <http://hp.vector.co.jp/authors/VA008030/bfs/>
 Does anyone know of a more current email address for Makoto? He doesn't
 respond to the address given above...
+
+Current maintainer: Sergey S. Kostyliov <rathamahata@php4.ru>
 
 WHAT IS THIS DRIVER?
 ==================

-- 
                   Best regards,
                   Sergey S. Kostyliov <rathamahata@php4.ru>
                   Public PGP key: http://sysadminday.org.ru/rathamahata.asc

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

* Re: [PATCH] befs (1/5): LBD support
  2004-05-14 16:09   ` Sergey S. Kostyliov
@ 2004-05-14 16:33     ` Will Dyson
  2004-05-14 16:33     ` Jörn Engel
  1 sibling, 0 replies; 8+ messages in thread
From: Will Dyson @ 2004-05-14 16:33 UTC (permalink / raw)
  To: Sergey S. Kostyliov; +Cc: linux-kernel

On Fri, 2004-05-14 at 20:09 +0400, Sergey S. Kostyliov wrote:

> > Nice. I haven't mounted any of my BeFS volumes in quite some months now. 
> >   Are you interested in taking over official maintainership?
> >
> 
> Yes, I am interested. How do you like this patch?

Thats fine with me.


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

* Re: [PATCH] befs (1/5): LBD support
  2004-05-14 16:09   ` Sergey S. Kostyliov
  2004-05-14 16:33     ` Will Dyson
@ 2004-05-14 16:33     ` Jörn Engel
  2004-05-14 16:58       ` Sergey S. Kostyliov
  1 sibling, 1 reply; 8+ messages in thread
From: Jörn Engel @ 2004-05-14 16:33 UTC (permalink / raw)
  To: Sergey S. Kostyliov; +Cc: Will Dyson, linux-kernel

On Fri, 14 May 2004 20:09:36 +0400, Sergey S. Kostyliov wrote:
> On Friday 14 May 2004 19:22, Will Dyson wrote:
> > 
> >   Are you interested in taking over official maintainership?
> 
> Yes, I am interested. How do you like this patch?

Good to know.  How do you like this patch?

Jörn

-- 
A quarrel is quickly settled when deserted by one party; there is
no battle unless there be two.
-- Seneca


Simply thinko:
inode->i_flags should never contain fs-specific flags.  In fact, it doesn't;
the checks against it cause "chattr +T" to be useless for ext[23].  Same
bug was in befs as well.

 linuxvfs.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


--- linux-2.6.5cow/fs/befs/linuxvfs.c~befs_inode_flags	2004-04-27 16:34:51.000000000 +0200
+++ linux-2.6.5cow/fs/befs/linuxvfs.c	2004-04-27 16:48:54.000000000 +0200
@@ -376,7 +376,7 @@
 	befs_ino->i_attribute = fsrun_to_cpu(sb, raw_inode->attributes);
 	befs_ino->i_flags = fs32_to_cpu(sb, raw_inode->flags);
 
-	if (S_ISLNK(inode->i_mode) && !(inode->i_flags & BEFS_LONG_SYMLINK)) {
+	if (S_ISLNK(inode->i_mode) && !(befs_ino->i_flags & BEFS_LONG_SYMLINK)){
 		inode->i_size = 0;
 		inode->i_blocks = befs_sb->block_size / VFS_BLOCK_SIZE;
 		strncpy(befs_ino->i_data.symlink, raw_inode->data.symlink,

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

* Re: [PATCH] befs (1/5): LBD support
  2004-05-14 16:33     ` Jörn Engel
@ 2004-05-14 16:58       ` Sergey S. Kostyliov
  0 siblings, 0 replies; 8+ messages in thread
From: Sergey S. Kostyliov @ 2004-05-14 16:58 UTC (permalink / raw)
  To: Jörn Engel; +Cc: Will Dyson, linux-kernel

On Friday 14 May 2004 20:33, Jörn Engel wrote:
> On Fri, 14 May 2004 20:09:36 +0400, Sergey S. Kostyliov wrote:
> > On Friday 14 May 2004 19:22, Will Dyson wrote:
> > > 
> > >   Are you interested in taking over official maintainership?
> > 
> > Yes, I am interested. How do you like this patch?
> 
> Good to know.  How do you like this patch?

This one seems obviously correct. Applied. Thank you!

-- 
                   Best regards,
                   Sergey S. Kostyliov <rathamahata@php4.ru>
                   Public PGP key: http://sysadminday.org.ru/rathamahata.asc

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

end of thread, other threads:[~2004-05-14 16:59 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-13 18:32 [PATCH] befs (1/5): LBD support Sergey S. Kostyliov
2004-05-14  2:16 ` Andrew Morton
2004-05-14 13:00   ` Sergey S. Kostyliov
2004-05-14 15:22 ` Will Dyson
2004-05-14 16:09   ` Sergey S. Kostyliov
2004-05-14 16:33     ` Will Dyson
2004-05-14 16:33     ` Jörn Engel
2004-05-14 16:58       ` Sergey S. Kostyliov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.