public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: YeYin <eyniy@qq.com>
Cc: Eric Sandeen <sandeen@sandeen.net>, xfs <xfs@oss.sgi.com>
Subject: Re: du result is smaller than xfs_quota report
Date: Fri, 23 Oct 2015 17:55:37 +1100	[thread overview]
Message-ID: <20151023065537.GE19199@dastard> (raw)
In-Reply-To: <tencent_309A49F965AE688A078ADD3E@qq.com>

On Wed, Oct 21, 2015 at 04:09:20PM +0800, YeYin wrote:
> Hi, Dave,
> Thank you very much. I got some results:
> # xfs_db -xr  /dev/sda4                        
> xfs_db> convert agno 1 agino 78272 ino
> 0x800131c0 (2147561920)
> xfs_db> inode 2147561920
> xfs_db> p
> core.magic = 0x494e
> core.mode = 0100600
> core.version = 2
> core.format = 2 (extents)
> core.nlinkv2 = 0
....
> However, I want to ask how this situation to happen?

Either O_TMPFILE files that are still open, or files that have been
unlinked but still have an open file descriptor referencing them.
They won't be unlinked until the last reference goes away.

> # tail -f /data/test.data &
> [1] 27598
> # unlink /data/test.data 
> 
> 
> # xfs_db -xr -c 'inode 29409295' -c p /dev/sda4
> core.magic = 0x494e
> core.mode = 0100644
> core.version = 2
> core.format = 2 (extents)
> core.nlinkv2 = 1

Inode hasn't been written back to disk yet. That happens
asynchronously, usually based on time, sometimes sooner due to log
space demands, sometimes longer due to repeated modifications.

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

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

      reply	other threads:[~2015-10-23  6:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-20  9:09 du result is smaller than xfs_quota report YeYin
2015-10-20 11:31 ` Emmanuel Florac
2015-10-20 13:30   ` YeYin
2015-10-20 19:35 ` Eric Sandeen
2015-10-21  6:37   ` YeYin
2015-10-21  7:13     ` Dave Chinner
2015-10-21  8:09       ` YeYin
2015-10-23  6:55         ` Dave Chinner [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151023065537.GE19199@dastard \
    --to=david@fromorbit.com \
    --cc=eyniy@qq.com \
    --cc=sandeen@sandeen.net \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox