All of lore.kernel.org
 help / color / mirror / Atom feed
* Writing journal only in Big Endian format
@ 2009-11-30  5:17 Nitin Arora
  2009-11-30  5:58 ` Eric Sandeen
  2009-11-30  6:43 ` Dave Chinner
  0 siblings, 2 replies; 4+ messages in thread
From: Nitin Arora @ 2009-11-30  5:17 UTC (permalink / raw)
  To: xfs, sandeen-xfs, p.mironchik, hch


[-- Attachment #1.1: Type: text/plain, Size: 1283 bytes --]

Hello,

We are using XFS (Kernel 2.6.18) and facing a problem.
When any XFS partition is plugged out from a little endian machine and
plugged in to a big endian machine,
it cannot be mounted and gives the following error.

FAT: utf8 is not a recommended IO charset for FAT filesystems, filesystem
will be case sensitive!

FAT: bogus number of FAT structure

VFS: Can't find a valid FAT filesystem on dev sda1.

VFS: Can't find ext3 filesystem on dev sda1.

XFS mounting filesystem sda1

Starting XFS recovery on filesystem: sda1 (logdev: internal)

XFS: dirty log written in incompatible format - can't recover

XFS: log mount/recovery failed: error 5

XFS: log mount failed


Mounting problem goes away after doing *"xfs_repair -L /dev/sdb2"

*The problem is that big endian machine cannot recognize the journal which
was written in
little endian format by the little endian machine and once the journal is
zerod out it can be mouted.

Now the solution to above problem seems writing journal always in big endian
format.

Please suggest me, Is there any design limitation in XFS for this.
Is it okay and feasible to implement it if yes then please give some
pointers so that it can be implemented, under some
suitable compile time switch.

Thanks in advance...

Regards
Nitin Arora

[-- Attachment #1.2: Type: text/html, Size: 1717 bytes --]

[-- Attachment #2: Type: text/plain, Size: 121 bytes --]

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

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

* Re: Writing journal only in Big Endian format
  2009-11-30  5:17 Writing journal only in Big Endian format Nitin Arora
@ 2009-11-30  5:58 ` Eric Sandeen
  2009-11-30  6:43 ` Dave Chinner
  1 sibling, 0 replies; 4+ messages in thread
From: Eric Sandeen @ 2009-11-30  5:58 UTC (permalink / raw)
  To: Nitin Arora; +Cc: sandeen-xfs, p.mironchik, hch, xfs


[-- Attachment #1.1: Type: text/plain, Size: 1813 bytes --]

On Nov 29, 2009, at 11:17 PM, Nitin Arora <nitin.arora.del@gmail.com>  
wrote:

> Hello,
>
> We are using XFS (Kernel 2.6.18) and facing a problem.
> When any XFS partition is plugged out from a little endian machine  
> and plugged in to a big endian machine,
> it cannot be mounted and gives the following error.
>
> FAT: utf8 is not a recommended IO charset for FAT filesystems,  
> filesystem will be case sensitive!
>
> FAT: bogus number of FAT structure
>
> VFS: Can't find a valid FAT filesystem on dev sda1.
>
> VFS: Can't find ext3 filesystem on dev sda1.
>
> XFS mounting filesystem sda1
>
> Starting XFS recovery on filesystem: sda1 (logdev: internal)
>
> XFS: dirty log written in incompatible format - can't recover
>
> XFS: log mount/recovery failed: error 5
>
> XFS: log mount failed
>
>

Yep this Is expected for a dirty log, but I think a cleanly unmounted  
filesystem should migrate without problems; is this not the case?

So really the problem should be limited to migrating -dirty-  
filesystems, and the complexity of endian-swapping the journal at  
runtime seems overly expensive for this odd case.

Just unmount before migration....

-Eric
>
> Mounting problem goes away after doing "xfs_repair -L /dev/sdb2"
>
> The problem is that big endian machine cannot recognize the journal  
> which was written in
> little endian format by the little endian machine and once the  
> journal is zerod out it can be mouted.
>
> Now the solution to above problem seems writing journal always in  
> big endian format.
>
> Please suggest me, Is there any design limitation in XFS for this.
> Is it okay and feasible to implement it if yes then please give some  
> pointers so that it can be implemented, under some
> suitable compile time switch.
>
> Thanks in advance...
>
> Regards
> Nitin Arora

[-- Attachment #1.2: Type: text/html, Size: 2422 bytes --]

[-- Attachment #2: Type: text/plain, Size: 121 bytes --]

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

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

* Re: Writing journal only in Big Endian format
  2009-11-30  5:17 Writing journal only in Big Endian format Nitin Arora
  2009-11-30  5:58 ` Eric Sandeen
@ 2009-11-30  6:43 ` Dave Chinner
  2009-12-10  8:26   ` Nitin Arora
  1 sibling, 1 reply; 4+ messages in thread
From: Dave Chinner @ 2009-11-30  6:43 UTC (permalink / raw)
  To: Nitin Arora; +Cc: sandeen-xfs, p.mironchik, hch, xfs

On Mon, Nov 30, 2009 at 10:47:41AM +0530, Nitin Arora wrote:
> The problem is that big endian machine cannot recognize the
> journal which was written in little endian format by the little
> endian machine and once the journal is zerod out it can be
> mouted.
> 
> Now the solution to above problem seems writing journal always in
> big endian format.

Or you could just replay the log on the little endian machine and do
a clean unmount, then you should be able to move it to the big
endian machine without losing anything.

> Please suggest me, Is there any design limitation in XFS for this.

No design limitation, just a *lot* of work to change. If you don't
have a few months handy to work on this, I'd just use the above
method....

> Is it okay and feasible to implement it if yes then please give
> some pointers so that it can be implemented,

All log headers, tails and sector fills need to be converted, every log
item format routine needs a big-endian version, log recovery needs
to be able to read both host-format and big-endian logs, all the
userspace tools need to learn about different log formats, QA tests
need to be written, etc.

> under some suitable
> compile time switch.

It could be done with a superblock feature bit, so the same kernel
could support both big-endian logs and host format.

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

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

* Re: Writing journal only in Big Endian format
  2009-11-30  6:43 ` Dave Chinner
@ 2009-12-10  8:26   ` Nitin Arora
  0 siblings, 0 replies; 4+ messages in thread
From: Nitin Arora @ 2009-12-10  8:26 UTC (permalink / raw)
  To: Dave Chinner; +Cc: sandeen-xfs, p.mironchik, hch, xfs


[-- Attachment #1.1: Type: text/plain, Size: 1649 bytes --]

Thanks Dave and Eric for your kind support.
We will then see if it is worth putting in effort for these changes or not.

Thanks




On Mon, Nov 30, 2009 at 12:13 PM, Dave Chinner <david@fromorbit.com> wrote:

> On Mon, Nov 30, 2009 at 10:47:41AM +0530, Nitin Arora wrote:
> > The problem is that big endian machine cannot recognize the
> > journal which was written in little endian format by the little
> > endian machine and once the journal is zerod out it can be
> > mouted.
> >
> > Now the solution to above problem seems writing journal always in
> > big endian format.
>
> Or you could just replay the log on the little endian machine and do
> a clean unmount, then you should be able to move it to the big
> endian machine without losing anything.
>
> > Please suggest me, Is there any design limitation in XFS for this.
>
> No design limitation, just a *lot* of work to change. If you don't
> have a few months handy to work on this, I'd just use the above
> method....
>
> > Is it okay and feasible to implement it if yes then please give
> > some pointers so that it can be implemented,
>
> All log headers, tails and sector fills need to be converted, every log
> item format routine needs a big-endian version, log recovery needs
> to be able to read both host-format and big-endian logs, all the
> userspace tools need to learn about different log formats, QA tests
> need to be written, etc.
>
> > under some suitable
> > compile time switch.
>
> It could be done with a superblock feature bit, so the same kernel
> could support both big-endian logs and host format.
>
> Cheers,
>
> Dave.
> --
> Dave Chinner
> david@fromorbit.com
>

[-- Attachment #1.2: Type: text/html, Size: 2256 bytes --]

[-- Attachment #2: Type: text/plain, Size: 121 bytes --]

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

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

end of thread, other threads:[~2009-12-10  8:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-30  5:17 Writing journal only in Big Endian format Nitin Arora
2009-11-30  5:58 ` Eric Sandeen
2009-11-30  6:43 ` Dave Chinner
2009-12-10  8:26   ` Nitin Arora

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.