The value displayed by 'ls -s' command is strange.

2010-12-07 Thread Tsutomu Itoh
Hi, I think that the disk allocation size of each file becomes a monotone increase when the file is made. But, it sometimes return to 0. Is it correct? The result of the test at 2.6.37-rc4 is shown below. (see inode no. 291) # df -T /test14 FilesystemType 1K-blocks Used

RE: [PATCH] Btrfs: pwrite blocked when writing from the mmaped buffer of the same page

2010-12-07 Thread Zhong, Xin
The other filesystems such as ext3 do not have this problem since they are using generic_file_buffered_write(). And this problem is fixed back in 2007 for generic_file_buffered_write(): http://lkml.org/lkml/2007/2/4/26 I am very new to btrfs. I am wondering why btrfs has it's own write routine?

RE: [PATCH] Btrfs: pwrite blocked when writing from the mmaped buffer of the same page

2010-12-07 Thread Zhong, Xin
Sorry, the format of the patch is not correct. I will submit again. -Original Message- From: linux-btrfs-ow...@vger.kernel.org [mailto:linux-btrfs-ow...@vger.kernel.org] On Behalf Of Zhong, Xin Sent: Tuesday, December 07, 2010 4:46 PM To: linux-btrfs@vger.kernel.org Subject: RE: [PATCH]

Re: The value displayed by 'ls -s' command is strange.

2010-12-07 Thread Li Zefan
Tsutomu Itoh wrote: Hi, I think that the disk allocation size of each file becomes a monotone increase when the file is made. But, it sometimes return to 0. Is it correct? The # of blocks is: stat-blocks = (inode_get_bytes(inode) +

[PATCH] Btrfs: pwrite blocked when writing from the mmaped buffer of the same page

2010-12-07 Thread Xin Zhong
This problem is found in meego testing: http://bugs.meego.com/show_bug.cgi?id=6672 A file in btrfs is mmaped and the mmaped buffer is passed to pwrite to write to the same page of the same file. In btrfs_file_aio_write(), the pages is locked by prepare_pages(). So when btrfs_copy_from_user() is

RE: [PATCH] Btrfs: pwrite blocked when writing from the mmaped buffer of the same page

2010-12-07 Thread Zhong, Xin
The previous patch is not ok (http://www.spinics.net/lists/linux-btrfs/msg07447.html). Please ignore it. Thanks! -Original Message- From: Zhong, Xin Sent: Tuesday, December 07, 2010 5:25 PM To: linux-btrfs@vger.kernel.org Cc: Zhong, Xin Subject: [PATCH] Btrfs: pwrite blocked when

RE: [PATCH] Btrfs: pwrite blocked when writing from the mmaped buffer of the same page

2010-12-07 Thread Zhong, Xin
The other filesystems such as ext3 do not have this problem since they are using generic_file_buffered_write(). And this problem is fixed back in 2007 for generic_file_buffered_write(): http://lkml.org/lkml/2007/2/4/26 I am very new to btrfs. I am wondering why btrfs has it's own write routine?

Re: Appending data to the middle of a file using btrfs-specific features

2010-12-07 Thread Nirbheek Chauhan
[I think the mail was sent to just me due to a reply-accident, I've re-added the mailing list for this reply] On Tue, Dec 7, 2010 at 3:50 PM, David Pottage da...@electric-spoon.com wrote: On 06/12/10 12:41, Nirbheek Chauhan wrote: I'd like to know if there has been any discussion about adding

[PATCH] btrfs: avoid compiler warnings

2010-12-07 Thread Jan Beulich
... regarding an unused function when !MIGRATION, and regarding a printk() format string vs argument mismatch. Signed-off-by: Jan Beulich jbeul...@novell.com --- fs/btrfs/disk-io.c |6 ++ fs/btrfs/inode.c |6 +++--- 2 files changed, 5 insertions(+), 7 deletions(-) ---

Re: What to do about subvolumes?

2010-12-07 Thread Christoph Hellwig
=== What do subvolumes look like? === All the user sees are directories. They act like any other directory acts, with a few exceptions 1) You cannot hardlink between subvolumes. This is because subvolumes have their own inode numbers and such, think of them as seperate mounts in this

Re: What to do about subvolumes?

2010-12-07 Thread Christoph Hellwig
On Sat, Dec 04, 2010 at 09:27:56AM +1100, Dave Chinner wrote: A property of NFS fileshandles is that they must be stable across server reboots. Is this anon dev_t used as part of the NFS filehandle and if so how can you guarantee that it is stable? It's just as stable as a real dev_t in the

Re: What to do about subvolumes?

2010-12-07 Thread hch
On Fri, Dec 03, 2010 at 05:45:26PM -0500, J. Bruce Fields wrote: We're using statfs64.fs_fsid for this; I believe that's both stable across reboots and distinguishes between subvolumes, so that's OK. It's a field that doesn't have any useful specification and basically contains random garbage

Re: [PATCH] Btrfs: pwrite blocked when writing from the mmaped buffer of the same page

2010-12-07 Thread Christoph Hellwig
Care to write a xfstests test for this behaviour? -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: What to do about subvolumes?

2010-12-07 Thread Trond Myklebust
On Tue, 2010-12-07 at 17:51 +0100, Christoph Hellwig wrote: On Sat, Dec 04, 2010 at 09:27:56AM +1100, Dave Chinner wrote: A property of NFS fileshandles is that they must be stable across server reboots. Is this anon dev_t used as part of the NFS filehandle and if so how can you guarantee

Re: 800 GByte free, but no space left

2010-12-07 Thread Helmut Hullen
Hallo, Hugo, Du meintest am 06.12.10: Kernel 2.6.37-rc4: # btrfs filesystem df /srv/MM Data, RAID0: total=2.39TB, used=2.37TB System, RAID1: total=8.00MB, used=188.00KB System: total=4.00MB, used=0.00 Metadata, RAID1: total=4.25GB, used=3.51GB Metadata, DUP: total=1.00GB, used=2.33MB

Re: 800 GByte free, but no space left

2010-12-07 Thread Hugo Mills
Helmut - On Tue, Dec 07, 2010 at 06:05:00PM +0100, Helmut Hullen wrote: Du meintest am 06.12.10: Kernel 2.6.37-rc4: # btrfs filesystem df /srv/MM Data, RAID0: total=2.39TB, used=2.37TB System, RAID1: total=8.00MB, used=188.00KB System: total=4.00MB, used=0.00 Metadata, RAID1:

Re: hunt for 2.6.37 dm-crypt+ext4 corruption? (was: Re: dm-crypt barrier support is effective)

2010-12-07 Thread Jon Nelson
I finally found some time to test this out. With 2.6.37-rc4 (openSUSE KOTD kernel) I easily encounter the issue. Using a virtual machine, I created a stock, minimal openSUSE 11.3 x86_64 install, installed all updates, installed postgresql and the 'KOTD' (Kernel of the Day) kernel, and ran the

Re: hunt for 2.6.37 dm-crypt+ext4 corruption? (was: Re: dm-crypt barrier support is effective)

2010-12-07 Thread Mike Snitzer
On Tue, Dec 07 2010 at 1:10pm -0500, Jon Nelson jnel...@jamponi.net wrote: I finally found some time to test this out. With 2.6.37-rc4 (openSUSE KOTD kernel) I easily encounter the issue. Using a virtual machine, I created a stock, minimal openSUSE 11.3 x86_64 install, installed all

Re: hunt for 2.6.37 dm-crypt+ext4 corruption? (was: Re: dm-crypt barrier support is effective)

2010-12-07 Thread Jon Nelson
On Tue, Dec 7, 2010 at 12:22 PM, Mike Snitzer snit...@redhat.com wrote: On Tue, Dec 07 2010 at  1:10pm -0500, Jon Nelson jnel...@jamponi.net wrote: I finally found some time to test this out. With 2.6.37-rc4 (openSUSE KOTD kernel) I easily encounter the issue. Using a virtual machine, I

Re: The value displayed by 'ls -s' command is strange.

2010-12-07 Thread Chris Mason
Excerpts from Tsutomu Itoh's message of 2010-12-07 02:59:52 -0500: Hi, I think that the disk allocation size of each file becomes a monotone increase when the file is made. But, it sometimes return to 0. Is it correct? Well, there's a window during the processing of delayed allocation

Re: hunt for 2.6.37 dm-crypt+ext4 corruption? (was: Re: dm-crypt barrier support is effective)

2010-12-07 Thread Chris Mason
Excerpts from Jon Nelson's message of 2010-12-07 13:45:14 -0500: On Tue, Dec 7, 2010 at 12:22 PM, Mike Snitzer snit...@redhat.com wrote: On Tue, Dec 07 2010 at  1:10pm -0500, Jon Nelson jnel...@jamponi.net wrote: I finally found some time to test this out. With 2.6.37-rc4 (openSUSE KOTD

Re: The value displayed by 'ls -s' command is strange.

2010-12-07 Thread Mike Fedyk
On Tue, Dec 7, 2010 at 10:44 AM, Chris Mason chris.ma...@oracle.com wrote: Excerpts from Tsutomu Itoh's message of 2010-12-07 02:59:52 -0500: Hi, I think that the disk allocation size of each file becomes a monotone increase when the file is made. But, it sometimes return to 0.  Is it

Re: The value displayed by 'ls -s' command is strange.

2010-12-07 Thread Chris Mason
Excerpts from Mike Fedyk's message of 2010-12-07 14:16:55 -0500: On Tue, Dec 7, 2010 at 10:44 AM, Chris Mason chris.ma...@oracle.com wrote: Excerpts from Tsutomu Itoh's message of 2010-12-07 02:59:52 -0500: Hi, I think that the disk allocation size of each file becomes a monotone

Re: hunt for 2.6.37 dm-crypt+ext4 corruption? (was: Re: dm-crypt barrier support is effective)

2010-12-07 Thread Jon Nelson
On Tue, Dec 7, 2010 at 12:52 PM, Chris Mason chris.ma...@oracle.com wrote: Excerpts from Jon Nelson's message of 2010-12-07 13:45:14 -0500: On Tue, Dec 7, 2010 at 12:22 PM, Mike Snitzer snit...@redhat.com wrote: On Tue, Dec 07 2010 at  1:10pm -0500, Jon Nelson jnel...@jamponi.net wrote:

Re: hunt for 2.6.37 dm-crypt+ext4 corruption? (was: Re: dm-crypt barrier support is effective)

2010-12-07 Thread Ted Ts'o
On Tue, Dec 07, 2010 at 01:22:43PM -0500, Mike Snitzer wrote: 1. create a database (from bash): createdb test 2. place the following contents in a file (I used 't.sql'): begin; create temporary table foo as select x as a, ARRAY[x] as b FROM generate_series(1, 1000 ) AS x;

Re: hunt for 2.6.37 dm-crypt+ext4 corruption? (was: Re: dm-crypt barrier support is effective)

2010-12-07 Thread Chris Mason
Excerpts from Jon Nelson's message of 2010-12-07 14:34:40 -0500: On Tue, Dec 7, 2010 at 12:52 PM, Chris Mason chris.ma...@oracle.com wrote: postgresql errors. Typically, header corruption but from the limited visibility I've had into this via strace, what I see is zeroed pages where there

Re: The value displayed by 'ls -s' command is strange.

2010-12-07 Thread Mike Fedyk
On Tue, Dec 7, 2010 at 11:29 AM, Chris Mason chris.ma...@oracle.com wrote: Excerpts from Mike Fedyk's message of 2010-12-07 14:16:55 -0500: On Tue, Dec 7, 2010 at 10:44 AM, Chris Mason chris.ma...@oracle.com wrote: Excerpts from Tsutomu Itoh's message of 2010-12-07 02:59:52 -0500: Hi, I

Re: The value displayed by 'ls -s' command is strange.

2010-12-07 Thread Chris Mason
Excerpts from Mike Fedyk's message of 2010-12-07 15:07:08 -0500: On Tue, Dec 7, 2010 at 11:29 AM, Chris Mason chris.ma...@oracle.com wrote: Excerpts from Mike Fedyk's message of 2010-12-07 14:16:55 -0500: On Tue, Dec 7, 2010 at 10:44 AM, Chris Mason chris.ma...@oracle.com wrote:

Re: hunt for 2.6.37 dm-crypt+ext4 corruption? (was: Re: dm-crypt barrier support is effective)

2010-12-07 Thread Jon Nelson
On Tue, Dec 7, 2010 at 2:02 PM, Chris Mason chris.ma...@oracle.com wrote: Excerpts from Jon Nelson's message of 2010-12-07 14:34:40 -0500: On Tue, Dec 7, 2010 at 12:52 PM, Chris Mason chris.ma...@oracle.com wrote: postgresql errors. Typically, header corruption but from the limited

Re: hunt for 2.6.37 dm-crypt+ext4 corruption? (was: Re: dm-crypt barrier support is effective)

2010-12-07 Thread Chris Mason
Excerpts from Jon Nelson's message of 2010-12-07 15:25:47 -0500: On Tue, Dec 7, 2010 at 2:02 PM, Chris Mason chris.ma...@oracle.com wrote: Excerpts from Jon Nelson's message of 2010-12-07 14:34:40 -0500: On Tue, Dec 7, 2010 at 12:52 PM, Chris Mason chris.ma...@oracle.com wrote:

Re: hunt for 2.6.37 dm-crypt+ext4 corruption? (was: Re: dm-crypt barrier support is effective)

2010-12-07 Thread Jon Nelson
On Tue, Dec 7, 2010 at 2:33 PM, Chris Mason chris.ma...@oracle.com wrote: Excerpts from Jon Nelson's message of 2010-12-07 15:25:47 -0500: On Tue, Dec 7, 2010 at 2:02 PM, Chris Mason chris.ma...@oracle.com wrote: Excerpts from Jon Nelson's message of 2010-12-07 14:34:40 -0500: On Tue, Dec 7,

Re: hunt for 2.6.37 dm-crypt+ext4 corruption? (was: Re: dm-crypt barrier support is effective)

2010-12-07 Thread Chris Mason
Excerpts from Jon Nelson's message of 2010-12-07 15:25:47 -0500: On Tue, Dec 7, 2010 at 2:02 PM, Chris Mason chris.ma...@oracle.com wrote: Excerpts from Jon Nelson's message of 2010-12-07 14:34:40 -0500: On Tue, Dec 7, 2010 at 12:52 PM, Chris Mason chris.ma...@oracle.com wrote:

Re: What to do about subvolumes?

2010-12-07 Thread J. Bruce Fields
On Tue, Dec 07, 2010 at 05:52:13PM +0100, hch wrote: On Fri, Dec 03, 2010 at 05:45:26PM -0500, J. Bruce Fields wrote: We're using statfs64.fs_fsid for this; I believe that's both stable across reboots and distinguishes between subvolumes, so that's OK. It's a field that doesn't have any

Re: hunt for 2.6.37 dm-crypt+ext4 corruption? (was: Re: dm-crypt barrier support is effective)

2010-12-07 Thread Jon Nelson
On Tue, Dec 7, 2010 at 2:41 PM, Chris Mason chris.ma...@oracle.com wrote: Excerpts from Jon Nelson's message of 2010-12-07 15:25:47 -0500: On Tue, Dec 7, 2010 at 2:02 PM, Chris Mason chris.ma...@oracle.com wrote: Excerpts from Jon Nelson's message of 2010-12-07 14:34:40 -0500: On Tue, Dec 7,

Re: hunt for 2.6.37 dm-crypt+ext4 corruption? (was: Re: dm-crypt barrier support is effective)

2010-12-07 Thread Jon Nelson
On Tue, Dec 7, 2010 at 1:35 PM, Ted Ts'o ty...@mit.edu wrote: On Tue, Dec 07, 2010 at 01:22:43PM -0500, Mike Snitzer wrote: 1. create a database (from bash): createdb test 2. place the following contents in a file (I used 't.sql'): begin; create temporary table foo as select x as

Re: hunt for 2.6.37 dm-crypt+ext4 corruption? (was: Re: dm-crypt barrier support is effective)

2010-12-07 Thread Chris Mason
Excerpts from Jon Nelson's message of 2010-12-07 15:48:58 -0500: On Tue, Dec 7, 2010 at 2:41 PM, Chris Mason chris.ma...@oracle.com wrote: Excerpts from Jon Nelson's message of 2010-12-07 15:25:47 -0500: On Tue, Dec 7, 2010 at 2:02 PM, Chris Mason chris.ma...@oracle.com wrote: Excerpts

Re: The value displayed by 'ls -s' command is strange.

2010-12-07 Thread Mike Fedyk
On Tue, Dec 7, 2010 at 12:15 PM, Chris Mason chris.ma...@oracle.com wrote: Excerpts from Mike Fedyk's message of 2010-12-07 15:07:08 -0500: On Tue, Dec 7, 2010 at 11:29 AM, Chris Mason chris.ma...@oracle.com wrote: Excerpts from Mike Fedyk's message of 2010-12-07 14:16:55 -0500: On Tue, Dec

Re: The value displayed by 'ls -s' command is strange.

2010-12-07 Thread Tsutomu Itoh
(2010/12/08 5:15), Chris Mason wrote: Excerpts from Mike Fedyk's message of 2010-12-07 15:07:08 -0500: On Tue, Dec 7, 2010 at 11:29 AM, Chris Mason chris.ma...@oracle.com wrote: Excerpts from Mike Fedyk's message of 2010-12-07 14:16:55 -0500: On Tue, Dec 7, 2010 at 10:44 AM, Chris Mason

Re: hunt for 2.6.37 dm-crypt+ext4 corruption? (was: Re: dm-crypt barrier support is effective)

2010-12-07 Thread Jon Nelson
On Tue, Dec 7, 2010 at 3:02 PM, Chris Mason chris.ma...@oracle.com wrote: Excerpts from Jon Nelson's message of 2010-12-07 15:48:58 -0500: On Tue, Dec 7, 2010 at 2:41 PM, Chris Mason chris.ma...@oracle.com wrote: Excerpts from Jon Nelson's message of 2010-12-07 15:25:47 -0500: On Tue, Dec 7,

Re: hunt for 2.6.37 dm-crypt+ext4 corruption? (was: Re: dm-crypt barrier support is effective)

2010-12-07 Thread Jon Nelson
On Tue, Dec 7, 2010 at 1:35 PM, Ted Ts'o ty...@mit.edu wrote: On Tue, Dec 07, 2010 at 01:22:43PM -0500, Mike Snitzer wrote: 1. create a database (from bash): createdb test 2. place the following contents in a file (I used 't.sql'): begin; create temporary table foo as select x as

Re: hunt for 2.6.37 dm-crypt+ext4 corruption? (was: Re: dm-crypt barrier support is effective)

2010-12-07 Thread Jon Nelson
On Tue, Dec 7, 2010 at 2:41 PM, Chris Mason chris.ma...@oracle.com wrote: Excerpts from Jon Nelson's message of 2010-12-07 15:25:47 -0500: On Tue, Dec 7, 2010 at 2:02 PM, Chris Mason chris.ma...@oracle.com wrote: Excerpts from Jon Nelson's message of 2010-12-07 14:34:40 -0500: On Tue, Dec 7,