Received: with ECARTIS (v1.0.0; list xfs); Mon, 25 Aug 2008 04:07:11 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.3.0-r574664 (2007-09-11) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_43, MIME_8BIT_HEADER autolearn=no version=3.3.0-r574664 Received: from cuda.sgi.com (cuda1.sgi.com [192.48.168.28]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id m7PB78mq000588 for ; Mon, 25 Aug 2008 04:07:08 -0700 X-ASG-Debug-ID: 1219662510-73b6037b0000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from wf-out-1314.google.com (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id E8685FB10CA for ; Mon, 25 Aug 2008 04:08:30 -0700 (PDT) Received: from wf-out-1314.google.com (wf-out-1314.google.com [209.85.200.168]) by cuda.sgi.com with ESMTP id 36kOpZz17RqIeNvC for ; Mon, 25 Aug 2008 04:08:30 -0700 (PDT) Received: by wf-out-1314.google.com with SMTP id 26so1600820wfd.32 for ; Mon, 25 Aug 2008 04:08:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=6vnFexblZNkboH/KbxKI8KDc0tvzcnZ/srz8bUezBko=; b=de3nYplGFoOnp6mC1jmGMxY3+cYr5its3zUHSqDKikMNDDImfzaPGYh+KZWtbpAkYO D4D1ADI3L1XyuDQ4doOJbYaudFh673CrsRBpC9hMTQHZrlPcJUWOysGbs5/n9Xh2re68 y4dGDBHqxLJpXiZ4UCJwOYk2Q8di1B4CZ+bv0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=D1k2F+xPV+RT3M9kXXn6hcjKjt92qh81I1K8WtFRY8GV2hFYcEH7xGyIGmiBILXD/E MyhIpgfwZLU7hLpcNmQXfUItnnP8PYgvEmEJVFdYaR6KQmahRF/58BVogXGFVGbpFef+ 7jWmk0KzNeExeaz7n5XY8rLHzWkSGTk3wUBxA= Received: by 10.142.125.4 with SMTP id x4mr1472034wfc.324.1219662509754; Mon, 25 Aug 2008 04:08:29 -0700 (PDT) Received: by 10.142.112.10 with HTTP; Mon, 25 Aug 2008 04:08:29 -0700 (PDT) Message-ID: <50ed5c760808250408o44aeaf07me262eab8da8340ba@mail.gmail.com> Date: Mon, 25 Aug 2008 13:08:29 +0200 From: "=?ISO-8859-2?Q?S=B3awomir_Nowakowski?=" To: "=?ISO-8859-2?Q?S=B3awomir_Nowakowski?=" , xfs@oss.sgi.com X-ASG-Orig-Subj: Re: XFS issue under 2.6.25.13 kernel Subject: Re: XFS issue under 2.6.25.13 kernel In-Reply-To: <20080823010524.GM5706@disturbed> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-2 Content-Disposition: inline References: <50ed5c760808220303p37e03e8dge5b868a572374e0b@mail.gmail.com> <20080823010524.GM5706@disturbed> X-Barracuda-Connect: wf-out-1314.google.com[209.85.200.168] X-Barracuda-Start-Time: 1219662510 X-Barracuda-Bayes: INNOCENT GLOBAL 0.0001 1.0000 -2.0203 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com X-Barracuda-Spam-Score: -2.02 X-Barracuda-Spam-Status: No, SCORE=-2.02 using per-user scores of TAG_LEVEL=2.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=2.1 tests=MAILTO_TO_SPAM_ADDR X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.1.3669 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.00 MAILTO_TO_SPAM_ADDR URI: Includes a link to a likely spammer email X-Virus-Scanned: ClamAV 0.91.2/8084/Mon Aug 25 01:02:23 2008 on oss.sgi.com X-Virus-Status: Clean Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by oss.sgi.com id m7PB78mq000590 X-archive-position: 17704 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: nailman23@gmail.com Precedence: bulk X-list: xfs 2008/8/23 Dave Chinner : > On Fri, Aug 22, 2008 at 12:03:40PM +0200, Sławomir Nowakowski wrote: >> Dear All, >> >> We have a problem with implementing xfs file system for Linux. The problem >> appears after mounting xfs file system on 2.6.25.13 kernel that is created on >> 2.6.17.13 kernel. >> >> File system is created on logical volume in the following way: >> >> lvcreate -L 4G volume1 -n test >> mkfs.xfs /dev/volume1/test >> mount /dev/volume1/test /mnt/x >> >> After mounting it on 2.6.17.13 kernel "df -B 1" output looks like this: >> >> /dev/volume1/test 4284481536 147456 4284334080 1% /mnt/x >> >> but in case of 2.6.25.13 kernel: >> >> /dev/volume1/test 4284481536 4489216 4279992320 1% /mnt/x >> >> The same happens in case of 2.6.26.3 kernel. > > Yeah, we reserved 4MB of space for unreserved delayed metadata > allocations to allow transactions to succeed when at ENOSPC. That > reservation is accounted as 'used space' to prevent it being used by > data. > Thank you for information. >> As it is shown after mounting the volume in newer kernel size of file system >> is visible smaller. The problem appears when on this volume exists one big >> file, occupying all available space. After trying to mount it under newer >> kernel, the file is cut because available free space is smaller. > > What is on disk will not change - the reservation is purely an > in-memory construct. i.e. if the file already exists then it > won't change on upgrade. Can you show how the file changes just > by booting a different kernel (e.g. ls -l output, md5sums, etc). > For tests we have used two kernels: 2.6.17.13 and 2.6.25.13 We have created following partition map: Disk /dev/sda: 500.1 GB, 500107862016 bytes 255 heads, 63 sectors/track, 60801 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sda1 1 123 987966 83 Linux /dev/sda2 124 155 257040 83 Linux /dev/sda3 156 778 5004247+ 83 Linux Next under kernel 2.6.17.1e we have created XFS partition onto sda3: # mkfs.xfs /dev/sda3 and have mounted it: # mount /dev/sda3 /mnt/z Next we have created some files: -one big file called "bigfile" and size of 5109497856 bytes -two small text files called: "file1" and "file2" At this stage it looked as follows: root@localhost:~# ls -la /mnt/z; df total 4989773 drwxr-xr-x 2 root root 44 Aug 25 09:35 . drwxr-xr-x 25 root root 1024 Aug 25 08:30 .. -rw-r--r-- 1 root root 5109497856 Aug 25 08:33 bigfile -rw-r--r-- 1 root root 15132 May 30 15:04 file1 -rw------- 1 root root 7537 Aug 7 15:32 file2 Filesystem 1K-blocks Used Available Use% Mounted on /dev/sda3 4993984 4989916 4068 100% /mnt/z Then we have run system with 2.6.25.13 kernel and checked how it looks: root@localhost:~# ls -la /mnt/z; df total 4989773 drwxr-xr-x 2 root root 44 Aug 25 09:35 . drwxr-xr-x 25 root root 1024 Aug 25 08:30 .. -rw-r--r-- 1 root root 5109497856 Aug 25 08:33 bigfile -rw-r--r-- 1 root root 15132 May 30 15:04 file1 -rw------- 1 root root 7537 Aug 7 15:32 file2 Filesystem 1K-blocks Used Available Use% Mounted on /dev/sda3 4993984 4993984 0 100% /mnt/z As it shown in case of 2.6.25.13 kernel system reports no free space, but under 2.6.17.13 kernel there is 4068kB of free space. At this stage when editing file file1 with i.e. mcedit and trying to write changes, the system cuts this file to 0 bytes! The same situation does not happen when we use: cat file2 >> file1 In this case the system connects two files properly. >> Is it known issue and/or does solution or workaround exists? > > $ sudo xfs_io -x -c 'resblks 0' > > will remove the reservation. This means your filesystem can shutdown > or lose data at ENOSPC in certain circumstances.... A question: does using the command: $ sudo xfs_io -x -c 'resblks 0' for 2.6.25.13 kernel gives higher risk of losing data then in case of 2.6.17.13 kernel. > > Cheers, > > Dave. > -- > Dave Chinner > david@fromorbit.com > Thank you very much for your help Roland nailman23@gmail.com