Re: [PATCH] xfs: Fix possible truncation of log data in xlog_bread_noalign()

2013-03-04 Thread Dave Chinner
On Mon, Mar 04, 2013 at 08:32:45AM +, Tony Lu wrote: > Thanks for you following up. > > My apologize that I just found that it is one change I made before > that causes this problem. This change forces mkfs.xfs to format > xfs partitions whose sectorsize were not smaller than 4096 bytes, >

RE: [PATCH] xfs: Fix possible truncation of log data in xlog_bread_noalign()

2013-03-04 Thread Tony Lu
ginal Message- >From: Mark Tinguely [mailto:tingu...@sgi.com] >Sent: Saturday, March 02, 2013 4:24 AM >To: Tony Lu >Cc: Alex Elder; linux-kernel@vger.kernel.org; Chris Metcalf; x...@oss.sgi.com; >Ben Myers; Dave Chinner; linux-fsde...@vger.kernel.org >Subject: Re:

RE: [PATCH] xfs: Fix possible truncation of log data in xlog_bread_noalign()

2013-03-04 Thread Tony Lu
[mailto:tingu...@sgi.com] Sent: Saturday, March 02, 2013 4:24 AM To: Tony Lu Cc: Alex Elder; linux-kernel@vger.kernel.org; Chris Metcalf; x...@oss.sgi.com; Ben Myers; Dave Chinner; linux-fsde...@vger.kernel.org Subject: Re: [PATCH] xfs: Fix possible truncation of log data in xlog_bread_noalign() On 03/01

Re: [PATCH] xfs: Fix possible truncation of log data in xlog_bread_noalign()

2013-03-04 Thread Dave Chinner
On Mon, Mar 04, 2013 at 08:32:45AM +, Tony Lu wrote: Thanks for you following up. My apologize that I just found that it is one change I made before that causes this problem. This change forces mkfs.xfs to format xfs partitions whose sectorsize were not smaller than 4096 bytes, which

Re: [PATCH] xfs: Fix possible truncation of log data in xlog_bread_noalign()

2013-03-01 Thread Mark Tinguely
On 03/01/13 09:51, Mark Tinguely wrote: On 02/26/13 01:28, Tony Lu wrote: I get a reliable way to reproduce this bug. The logprint and metadump are attached. Kernel version: 2.6.38.8 Mkfs.xfs version: xfsprogs-3.1.1 mkfs.xfs -s size=4096 /dev/sda1 Run the following mount-cp-umount script to

Re: [PATCH] xfs: Fix possible truncation of log data in xlog_bread_noalign()

2013-03-01 Thread Mark Tinguely
On 02/26/13 01:28, Tony Lu wrote: I get a reliable way to reproduce this bug. The logprint and metadump are attached. Kernel version: 2.6.38.8 Mkfs.xfs version: xfsprogs-3.1.1 mkfs.xfs -s size=4096 /dev/sda1 Run the following mount-cp-umount script to reproduce: #!/bin/sh device=/dev/sda1

Re: [PATCH] xfs: Fix possible truncation of log data in xlog_bread_noalign()

2013-03-01 Thread Mark Tinguely
On 02/26/13 01:28, Tony Lu wrote: I get a reliable way to reproduce this bug. The logprint and metadump are attached. Kernel version: 2.6.38.8 Mkfs.xfs version: xfsprogs-3.1.1 mkfs.xfs -s size=4096 /dev/sda1 Run the following mount-cp-umount script to reproduce: #!/bin/sh device=/dev/sda1

Re: [PATCH] xfs: Fix possible truncation of log data in xlog_bread_noalign()

2013-03-01 Thread Mark Tinguely
On 03/01/13 09:51, Mark Tinguely wrote: On 02/26/13 01:28, Tony Lu wrote: I get a reliable way to reproduce this bug. The logprint and metadump are attached. Kernel version: 2.6.38.8 Mkfs.xfs version: xfsprogs-3.1.1 mkfs.xfs -s size=4096 /dev/sda1 Run the following mount-cp-umount script to

Re: [PATCH] xfs: Fix possible truncation of log data in xlog_bread_noalign()

2013-02-26 Thread Dave Chinner
On Tue, Feb 26, 2013 at 07:28:19AM +, Tony Lu wrote: > I get a reliable way to reproduce this bug. The logprint and metadump are > attached. > > Kernel version: 2.6.38.8 This is important because this: > 4 umount /dev/sda1 /mnt > 5 mount /dev/sda1 /mnt > XFS mounting

Re: [PATCH] xfs: Fix possible truncation of log data in xlog_bread_noalign()

2013-02-26 Thread Dave Chinner
On Tue, Feb 26, 2013 at 07:28:19AM +, Tony Lu wrote: I get a reliable way to reproduce this bug. The logprint and metadump are attached. Kernel version: 2.6.38.8 This is important because this: 4 umount /dev/sda1 /mnt 5 mount /dev/sda1 /mnt XFS mounting filesystem

Re: [PATCH] xfs: Fix possible truncation of log data in xlog_bread_noalign()

2013-02-24 Thread Dave Chinner
On Sun, Feb 24, 2013 at 04:46:30AM +, Tony Lu wrote: > >> For example, if xlog_bread_noalign() wants to read blocks from #1 > >> to # 9, in which case the passed parameter blk_no is 1, and nbblks > >> is 8, sectBBsize is 8, after the round down and round up > >> operations, we get blk_no as 0,

Re: [PATCH] xfs: Fix possible truncation of log data in xlog_bread_noalign()

2013-02-24 Thread Dave Chinner
On Sun, Feb 24, 2013 at 04:46:30AM +, Tony Lu wrote: For example, if xlog_bread_noalign() wants to read blocks from #1 to # 9, in which case the passed parameter blk_no is 1, and nbblks is 8, sectBBsize is 8, after the round down and round up operations, we get blk_no as 0, and nbblks

RE: [PATCH] xfs: Fix possible truncation of log data in xlog_bread_noalign()

2013-02-23 Thread Tony Lu
>> For example, if xlog_bread_noalign() wants to read blocks from #1 >> to # 9, in which case the passed parameter blk_no is 1, and nbblks >> is 8, sectBBsize is 8, after the round down and round up >> operations, we get blk_no as 0, and nbblks as still 8. We >> definitely lose the last block of

Re: [PATCH] xfs: Fix possible truncation of log data in xlog_bread_noalign()

2013-02-23 Thread Dave Chinner
On Sat, Feb 23, 2013 at 07:06:10AM +, Tony Lu wrote: > >From: Dave Chinner [mailto:da...@fromorbit.com] > >On Fri, Feb 22, 2013 at 08:12:52AM +, Tony Lu wrote: > >> I encountered the following panic when using xfs partitions as rootfs, > >> which > >> is due to the truncated log data read

RE: [PATCH] xfs: Fix possible truncation of log data in xlog_bread_noalign()

2013-02-23 Thread Tony Lu
>-Original Message- >From: Ben Myers [mailto:b...@sgi.com] > >Hi Tony, > >On Fri, Feb 22, 2013 at 08:12:52AM +, Tony Lu wrote: >> I encountered the following panic when using xfs partitions as rootfs, which >> is due to the truncated log data read by xlog_bread_noalign(). We should >>

RE: [PATCH] xfs: Fix possible truncation of log data in xlog_bread_noalign()

2013-02-23 Thread Tony Lu
-Original Message- From: Ben Myers [mailto:b...@sgi.com] Hi Tony, On Fri, Feb 22, 2013 at 08:12:52AM +, Tony Lu wrote: I encountered the following panic when using xfs partitions as rootfs, which is due to the truncated log data read by xlog_bread_noalign(). We should extend the

Re: [PATCH] xfs: Fix possible truncation of log data in xlog_bread_noalign()

2013-02-23 Thread Dave Chinner
On Sat, Feb 23, 2013 at 07:06:10AM +, Tony Lu wrote: From: Dave Chinner [mailto:da...@fromorbit.com] On Fri, Feb 22, 2013 at 08:12:52AM +, Tony Lu wrote: I encountered the following panic when using xfs partitions as rootfs, which is due to the truncated log data read by

RE: [PATCH] xfs: Fix possible truncation of log data in xlog_bread_noalign()

2013-02-23 Thread Tony Lu
For example, if xlog_bread_noalign() wants to read blocks from #1 to # 9, in which case the passed parameter blk_no is 1, and nbblks is 8, sectBBsize is 8, after the round down and round up operations, we get blk_no as 0, and nbblks as still 8. We definitely lose the last block of the log

RE: [PATCH] xfs: Fix possible truncation of log data in xlog_bread_noalign()

2013-02-22 Thread Tony Lu
>From: Dave Chinner [mailto:da...@fromorbit.com] >On Fri, Feb 22, 2013 at 08:12:52AM +, Tony Lu wrote: >> I encountered the following panic when using xfs partitions as rootfs, which >> is due to the truncated log data read by xlog_bread_noalign(). We should >> extend the buffer by one extra

Re: [PATCH] xfs: Fix possible truncation of log data in xlog_bread_noalign()

2013-02-22 Thread Dave Chinner
On Fri, Feb 22, 2013 at 08:12:52AM +, Tony Lu wrote: > I encountered the following panic when using xfs partitions as rootfs, which > is due to the truncated log data read by xlog_bread_noalign(). We should > extend the buffer by one extra log sector to ensure there's enough space to >

Re: [PATCH] xfs: Fix possible truncation of log data in xlog_bread_noalign()

2013-02-22 Thread Ben Myers
Hi Tony, On Fri, Feb 22, 2013 at 08:12:52AM +, Tony Lu wrote: > I encountered the following panic when using xfs partitions as rootfs, which > is due to the truncated log data read by xlog_bread_noalign(). We should > extend the buffer by one extra log sector to ensure there's enough space to

Re: [PATCH] xfs: Fix possible truncation of log data in xlog_bread_noalign()

2013-02-22 Thread Ben Myers
Hi Tony, On Fri, Feb 22, 2013 at 08:12:52AM +, Tony Lu wrote: I encountered the following panic when using xfs partitions as rootfs, which is due to the truncated log data read by xlog_bread_noalign(). We should extend the buffer by one extra log sector to ensure there's enough space to

Re: [PATCH] xfs: Fix possible truncation of log data in xlog_bread_noalign()

2013-02-22 Thread Dave Chinner
On Fri, Feb 22, 2013 at 08:12:52AM +, Tony Lu wrote: I encountered the following panic when using xfs partitions as rootfs, which is due to the truncated log data read by xlog_bread_noalign(). We should extend the buffer by one extra log sector to ensure there's enough space to accommodate

RE: [PATCH] xfs: Fix possible truncation of log data in xlog_bread_noalign()

2013-02-22 Thread Tony Lu
From: Dave Chinner [mailto:da...@fromorbit.com] On Fri, Feb 22, 2013 at 08:12:52AM +, Tony Lu wrote: I encountered the following panic when using xfs partitions as rootfs, which is due to the truncated log data read by xlog_bread_noalign(). We should extend the buffer by one extra log