linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Duncan <1i5t5.duncan@cox.net>
To: linux-btrfs@vger.kernel.org
Subject: Re: nocow flags
Date: Sat, 3 Mar 2012 05:45:28 +0000 (UTC)	[thread overview]
Message-ID: <pan.2012.03.03.05.45.28@cox.net> (raw)
In-Reply-To: COL113-W450746A36272A165E90E1FB06D0@phx.gbl

Kyle Gates posted on Fri, 02 Mar 2012 11:29:40 -0600 as excerpted:

> I set the C (NOCOW) and z (Not_Compressed) flags on a folder but the
> extent counts of files contained there keep increasing.
> Said files are large and frequently modified but not changing in size.
> This does not happen when the filesystem is mounted with nodatacow.
> 
> I'm using this as a workaround since subvolumes can't be mounted with
> different options simultaneously. ie. one with COW, one with nodatacow
> 
> Any ideas why the flags are being ignored?
> 
> I'm running 32bit 3.3rc4 with
> noatime,nodatasum,space_cache,autodefrag,inode_cache on a 3 disk RAID0
> data RAID1 metadata filesystem.

I'm not sure if it applies here or not, but there's a note on the wiki 
under the defrag discussion, that mentions that defrag, anyway, is per-
file, and defragging a dir doesn't defrag the files in that dir.  I'm
/guessing/ the same thing may apply here since these are per-file flags.

There's a workaround suggested.  Let me see if I can find that note 
again...

Found it in the problem FAQ:

http://btrfs.ipv5.de/index.php?
title=Problem_FAQ#Defragmenting_a_directory_doesn.27t_work

>>>>>

Defragmenting a directory doesn't work

Running this:

# btrfs filesystem defragment ~/stuff

doesn't defragment the contents of the directory.

This is by design. btrfs fi defrag operates on the single filesystem 
object passed to it. This means that the command defragments just the 
metadata held by the directory object, and not the contents of the 
directory. If you want to defragment the contents of the directory, 
something like this would be more useful:

# find -type f -xdev -print0 | xargs -0 btrfs fi defrag

<<<<<

Perhaps you need to do something similar to set the flags on all the 
files under a specific dir?

-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman


      reply	other threads:[~2012-03-03  5:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-02 17:29 nocow flags Kyle Gates
2012-03-03  5:45 ` Duncan [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=pan.2012.03.03.05.45.28@cox.net \
    --to=1i5t5.duncan@cox.net \
    --cc=linux-btrfs@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).