Bug#550010: hfsplus corrupts filesystems 2TB

2009-10-07 Thread dann frazier
On Wed, Oct 07, 2009 at 03:37:18AM +0100, Ben Hutchings wrote:
 This is my suggested change, so far only compile-tested:
 
 --- a/fs/hfsplus/wrapper.c
 +++ b/fs/hfsplus/wrapper.c
 @@ -99,6 +99,10 @@
  
   if (hfsplus_get_last_session(sb, part_start, part_size))
   return -EINVAL;
 + if (part_start + part_size = 0x1) {
 + pr_err(hfs: volumes larger than 2TB are not supported yet\n);
 + return -EINVAL;
 + }

minor point, but maybe s/hfs/hfsplus/ ?

   while (1) {
   bh = sb_bread512(sb, part_start + HFSPLUS_VOLHEAD_SECTOR, vhdr);
   if (!bh)
 --- END ---
 
 Ben.
 



-- 
dann frazier




-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#550010: hfsplus corrupts filesystems 2TB

2009-10-07 Thread Ben Hutchings
On Wed, 2009-10-07 at 09:27 -0600, dann frazier wrote:
 On Wed, Oct 07, 2009 at 03:37:18AM +0100, Ben Hutchings wrote:
  This is my suggested change, so far only compile-tested:
  
  --- a/fs/hfsplus/wrapper.c
  +++ b/fs/hfsplus/wrapper.c
  @@ -99,6 +99,10 @@
   
  if (hfsplus_get_last_session(sb, part_start, part_size))
  return -EINVAL;
  +   if (part_start + part_size = 0x1) {
  +   pr_err(hfs: volumes larger than 2TB are not supported yet\n);
  +   return -EINVAL;
  +   }
 
 minor point, but maybe s/hfs/hfsplus/ ?
[...]

This is consistent with other log messages from hfsplus.  While I think
the prefix *should* be hfsplus: , it seemed to me that it would be
worse to be inconsistent.  Also, the original HFS is intrinsically
limited to 2TB so this message is true for both of them.

Ben.

-- 
Ben Hutchings
To err is human; to really foul things up requires a computer.


signature.asc
Description: This is a digitally signed message part


Bug#550010: hfsplus corrupts filesystems 2TB

2009-10-06 Thread Ben Hutchings
This is my suggested change, so far only compile-tested:

--- a/fs/hfsplus/wrapper.c
+++ b/fs/hfsplus/wrapper.c
@@ -99,6 +99,10 @@
 
if (hfsplus_get_last_session(sb, part_start, part_size))
return -EINVAL;
+   if (part_start + part_size = 0x1) {
+   pr_err(hfs: volumes larger than 2TB are not supported yet\n);
+   return -EINVAL;
+   }
while (1) {
bh = sb_bread512(sb, part_start + HFSPLUS_VOLHEAD_SECTOR, vhdr);
if (!bh)
--- END ---

Ben.

-- 
Ben Hutchings
To err is human; to really foul things up requires a computer.


signature.asc
Description: This is a digitally signed message part