<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://blog.gmane.org/gmane.comp.file-systems.btrfs">
    <title>gmane.comp.file-systems.btrfs</title>
    <link>http://blog.gmane.org/gmane.comp.file-systems.btrfs</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.file-systems.btrfs/17593"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.file-systems.btrfs/17589"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.file-systems.btrfs/17574"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.file-systems.btrfs/17557"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.file-systems.btrfs/17556"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.file-systems.btrfs/17555"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.file-systems.btrfs/17554"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.file-systems.btrfs/17553"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.file-systems.btrfs/17551"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.file-systems.btrfs/17546"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.file-systems.btrfs/17544"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.file-systems.btrfs/17539"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.file-systems.btrfs/17537"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.file-systems.btrfs/17529"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.file-systems.btrfs/17527"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.file-systems.btrfs/17525"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.file-systems.btrfs/17520"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.file-systems.btrfs/17517"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.file-systems.btrfs/17508"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.file-systems.btrfs/17502"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://comments.gmane.org/gmane.comp.file-systems.btrfs/17593">
    <title>FROM MRS SUSAN SHABANGU(OPEN THE ATTACH FILES)</title>
    <link>http://comments.gmane.org/gmane.comp.file-systems.btrfs/17593</link>
    <description>&lt;pre&gt;&lt;/pre&gt;</description>
    <dc:creator>FROM MRS SUSAN SHABANGU</dc:creator>
    <dc:date>2012-05-26T10:56:23</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.file-systems.btrfs/17589">
    <title>[PATCH v2 00/15] Btrfs: tree modification log</title>
    <link>http://comments.gmane.org/gmane.comp.file-systems.btrfs/17589</link>
    <description>&lt;pre&gt;Chris: Please pull

git://git.jan-o-sch.net/btrfs-unstable for-chris

for 3.5, it's a major improvement for the backref resolver and a good
base to build qgroups and "btrfs send" onto. And, besides all other, its
implications on existing code outside backref.c are very small, mostly
added lines with no effect outside the backref resolver.

This patch set is to provide reliable backref resolving on busy trees.
The previous attempts to block certain tree modifications while we're
resolving backrefs all ended up in (dead-) locking nightmares. What we
now do is we record all the changes we make to fs trees while backref
resolving is in progress into a tree modification log. During backref
resolving we then merge the current state of the tree with the recorded
modifications to get a consistent previous state of the tree.

The first three commits are plain bug fixes, but the tree mod log
cannot function without them. So they're included in this patch set.
To only these three fixes, you can pull

git://git.jan-o-sch.net/btrfs-unstable 3.5-fixes

For the whole tree modification log, pull

git://git.jan-o-sch.net/btrfs-unstable tree-mod-log-v2

The tree-mod-log-v2 head is a stable alias for "for-chris".

Both branches are based on the current for-linus branch from Chris'
repository. Checked with xfstests (fails 254 273 275, which i claim has
nothing to do with this patch set) and hammered on the filesystem with
fs_mark while resolving backrefs in a loop.

I removed the qgroups patch series still contained in v1 because I
realized that the fs_mark tests I was doing weren't sufficient. When
testing qgroups with fsstress only for a few seconds, the accounting
breaks. Nothing really bad happens, but quota patches that don't get
quotas right are of litte use. A new qgroup patch set might come out
soon, but it won't make it into 3.5. There's a branch in my git repo
called tree-mod-log-quota-v1+fixes holding the current qgroup state.

Test it, break it, report it :-)

-Jan

--
Changes v1-&amp;gt;v2:
- qgroups patches removed
- ulist realloc bugfix added (reported by Alexander Block)
- btrfs_find_parent_nodes bugfix (reported by Alexander Block)
- various smaller bugs in the v1 patch set fixed (reported by Alexander
  Block, Tsutomu Itoh and myself)
--

Jan Schmidt (15):
  Btrfs: ulist realloc bugfix
  Btrfs: bugfix in btrfs_find_parent_nodes
  Btrfs: bugfix: ignore the wrong key for indirect tree block backrefs
  Btrfs: look into the extent during find_all_leafs
  Btrfs: don't set for_cow parameter for tree block functions
  Btrfs: move struct seq_list to ctree.h
  Btrfs: dummy extent buffers for tree mod log
  Btrfs: add tree mod log to fs_info
  Btrfs: add tree modification log functions
  Btrfs: put all block modifications into the tree mod log
  Btrfs: add del_ptr and insert_ptr modifications to the tree mod log
  Btrfs: add btrfs_search_old_slot
  Btrfs: use the tree modification log for backref resolving
  Btrfs: fs_info variable for join_transaction
  Btrfs: tree mod log sanity checks in join_transaction

 fs/btrfs/backref.c     |  465 +++++++++++++++++++---------
 fs/btrfs/backref.h     |    3 +-
 fs/btrfs/ctree.c       |  831 ++++++++++++++++++++++++++++++++++++++++++++++--
 fs/btrfs/ctree.h       |   27 ++-
 fs/btrfs/delayed-ref.h |    5 -
 fs/btrfs/disk-io.c     |    7 +-
 fs/btrfs/extent-tree.c |   10 +-
 fs/btrfs/extent_io.c   |   80 +++++-
 fs/btrfs/extent_io.h   |    3 +
 fs/btrfs/ioctl.c       |    2 +-
 fs/btrfs/transaction.c |   46 ++-
 fs/btrfs/ulist.c       |   23 +-
 fs/btrfs/ulist.h       |    9 +-
 13 files changed, 1286 insertions(+), 225 deletions(-)

&lt;/pre&gt;</description>
    <dc:creator>Jan Schmidt</dc:creator>
    <dc:date>2012-05-26T10:59:34</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.file-systems.btrfs/17574">
    <title>(unknown)</title>
    <link>http://comments.gmane.org/gmane.comp.file-systems.btrfs/17574</link>
    <description>&lt;pre&gt;
 i am robothroli, Purchase manager from roli Merchant Ltd. We are
Import/export Company based in taiwan. We are interested in purchasing
your product and I would like to make an inquiry. Please inform me on:

Sample availability and price
Minimum order quantity
FOB Prices

Sincerely
Purchase Manager
robothroli



--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo&amp;lt; at &amp;gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

&lt;/pre&gt;</description>
    <dc:creator>robothroli company</dc:creator>
    <dc:date>2012-05-25T13:45:54</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.file-systems.btrfs/17557">
    <title>Btrfs, snapshots and atime problems</title>
    <link>http://comments.gmane.org/gmane.comp.file-systems.btrfs/17557</link>
    <description>&lt;pre&gt;Hello,

I would like to start a discussion on atime in Btrfs (and possibly
other filesystems with snapshot support).

As atime is updated on every access of a file or directory, we get
many changes to the trees in btrfs that as always trigger cow
operations. This is no problem as long as the changed tree blocks are
not shared by other subvolumes. Performance is also not a problem, no
matter if shared or not (thanks to relatime which is the default).
The problems start when someone starts to use snapshots. If you for
example snapshot your root and continue working on your root, after
some time big parts of the tree will be cowed and unshared. In the
worst case, the whole tree gets unshared and thus takes up the double
space. Normally, a user would expect to only use extra space for a
tree if he changes something.
A worst case scenario would be if someone took regular snapshots for
backup purposes and later greps the contents of all snapshots to find
a specific file. This would touch all inodes in all trees and thus
make big parts of the trees unshared.

relatime (which is the default) reduces this problem a little bit, as
it by default only updates atime once a day. This means, if anyone
wants to test this problem, mount with relatime disabled or change the
system date before you try to update atime (that's the way i tested
it).

As a solution, I would suggest to make noatime the default for btrfs.
I'm however not sure if it is allowed in linux to have different
default mount options for different filesystem types. I know this
discussion pops up every few years (last time it resulted in making
relatime the default). But this is a special case for btrfs. atime is
already bad on other filesystems, but it's much much worse in btrfs.

Alex.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo&amp;lt; at &amp;gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

&lt;/pre&gt;</description>
    <dc:creator>Alexander Block</dc:creator>
    <dc:date>2012-05-25T15:15:40</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.file-systems.btrfs/17556">
    <title>The linux-joystick mailing list has been moved</title>
    <link>http://comments.gmane.org/gmane.comp.file-systems.btrfs/17556</link>
    <description>&lt;pre&gt;The linux-joystick mailing list has been superseded by the linux-input
list run at vger.kernel.org.  See http://vger.kernel.org/vger-lists.html for
information on the new list server (or consult your local oracle).

Yours virtually,
Martin Mares
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo&amp;lt; at &amp;gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

&lt;/pre&gt;</description>
    <dc:creator>Martin Mares</dc:creator>
    <dc:date>2012-05-25T14:59:24</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.file-systems.btrfs/17555">
    <title>[PATCH] Btrfs: fall back to non-inline if we don't have enough space</title>
    <link>http://comments.gmane.org/gmane.comp.file-systems.btrfs/17555</link>
    <description>&lt;pre&gt;If cow_file_range_inline fails with ENOSPC we abort the transaction which
isn't very nice.  This really shouldn't be happening anyways but there's no
sense in making it a horrible error when we can easily just go allocate
normal data space for this stuff.  Thanks,

Signed-off-by: Josef Bacik &amp;lt;josef&amp;lt; at &amp;gt;redhat.com&amp;gt;
---
 fs/btrfs/inode.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index cd51968..46d8732 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -257,10 +257,13 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static noinline int cow_file_range_inline(struct btrfs_trans_handle *trans,
 ret = insert_inline_extent(trans, root, inode, start,
    inline_len, compressed_size,
    compress_type, compressed_pages);
-if (ret) {
+if (ret &amp;amp;&amp;amp; ret != -ENOSPC) {
 btrfs_abort_transaction(trans, root, ret);
 return ret;
+} else if (ret == -ENOSPC) {
+return 1;
 }
+
 btrfs_delalloc_release_metadata(inode, end + 1 - start);
 btrfs_drop_extent_cache(inode, start, aligned_end - 1, 0);
 return 0;
&lt;/pre&gt;</description>
    <dc:creator>Josef Bacik</dc:creator>
    <dc:date>2012-05-25T14:10:30</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.file-systems.btrfs/17554">
    <title>[PATCH] Btrfs: fix how we deal with the orphan block rsv</title>
    <link>http://comments.gmane.org/gmane.comp.file-systems.btrfs/17554</link>
    <description>&lt;pre&gt;Ceph was hitting this race where we would remove an inode from the per-root
orphan list before we would release the space we had reserved for the inode.
We actually don't need a list or anything, we just need to make sure the
root doesn't try to free up the orphan reserve until after the inodes have
released their reservations.  So use an atomic counter instead of a list on
the root and only decrement the counter after we've released our
reservation.  I've tested this as well as several others and we no longer
see the warnings that you would see while running ceph.  Thanks,
Btrfs: fix how we deal with the orphan block rsv

Ceph was hitting this race where we would remove an inode from the per-root
orphan list before we would release the space we had reserved for the inode.
We actually don't need a list or anything, we just need to make sure the
root doesn't try to free up the orphan reserve until after the inodes have
released their reservations.  So use an atomic counter instead of a list on
the root and only decrement the counter after we've released our
reservation.  I've tested this as well as several others and we no longer
see the warnings that you would see while running ceph.  Thanks,

Signed-off-by: Josef Bacik &amp;lt;josef&amp;lt; at &amp;gt;redhat.com&amp;gt;
---
 fs/btrfs/btrfs_inode.h |    4 +---
 fs/btrfs/ctree.h       |    2 +-
 fs/btrfs/disk-io.c     |    2 +-
 fs/btrfs/inode.c       |   38 +++++++++++++++++++++-----------------
 4 files changed, 24 insertions(+), 22 deletions(-)

diff --git a/fs/btrfs/btrfs_inode.h b/fs/btrfs/btrfs_inode.h
index 6265edb..ce2c9d6 100644
--- a/fs/btrfs/btrfs_inode.h
+++ b/fs/btrfs/btrfs_inode.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -36,6 +36,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #define BTRFS_INODE_DUMMY2
 #define BTRFS_INODE_IN_DEFRAG3
 #define BTRFS_INODE_DELALLOC_META_RESERVED4
+#define BTRFS_INODE_HAS_ORPHAN_ITEM5
 
 /* in memory btrfs inode */
 struct btrfs_inode {
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -70,9 +71,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; struct btrfs_inode {
 /* used to order data wrt metadata */
 struct btrfs_ordered_inode_tree ordered_tree;
 
-/* for keeping track of orphaned inodes */
-struct list_head i_orphan;
-
 /* list of all the delalloc inodes in the FS.  There are times we need
  * to write all the delalloc pages to disk, and this list is used
  * to walk them all.
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index ba8743b..72cdf98 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1375,7 +1375,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; struct btrfs_root {
 struct list_head root_list;
 
 spinlock_t orphan_lock;
-struct list_head orphan_list;
+atomic_t orphan_inodes;
 struct btrfs_block_rsv *orphan_block_rsv;
 int orphan_item_inserted;
 int orphan_cleanup_state;
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 0cf8ef2..297e5a8 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1153,7 +1153,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void __setup_root(u32 nodesize, u32 leafsize, u32 sectorsize,
 root-&amp;gt;orphan_block_rsv = NULL;
 
 INIT_LIST_HEAD(&amp;amp;root-&amp;gt;dirty_list);
-INIT_LIST_HEAD(&amp;amp;root-&amp;gt;orphan_list);
 INIT_LIST_HEAD(&amp;amp;root-&amp;gt;root_list);
 spin_lock_init(&amp;amp;root-&amp;gt;orphan_lock);
 spin_lock_init(&amp;amp;root-&amp;gt;inode_lock);
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1166,6 +1165,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void __setup_root(u32 nodesize, u32 leafsize, u32 sectorsize,
 atomic_set(&amp;amp;root-&amp;gt;log_commit[0], 0);
 atomic_set(&amp;amp;root-&amp;gt;log_commit[1], 0);
 atomic_set(&amp;amp;root-&amp;gt;log_writers, 0);
+atomic_set(&amp;amp;root-&amp;gt;orphan_inodes, 0);
 root-&amp;gt;log_batch = 0;
 root-&amp;gt;log_transid = 0;
 root-&amp;gt;last_log_commit = 0;
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 2a5ca50..cd51968 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2104,12 +2104,12 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; void btrfs_orphan_commit_root(struct btrfs_trans_handle *trans,
 struct btrfs_block_rsv *block_rsv;
 int ret;
 
-if (!list_empty(&amp;amp;root-&amp;gt;orphan_list) ||
+if (atomic_read(&amp;amp;root-&amp;gt;orphan_inodes) ||
     root-&amp;gt;orphan_cleanup_state != ORPHAN_CLEANUP_DONE)
 return;
 
 spin_lock(&amp;amp;root-&amp;gt;orphan_lock);
-if (!list_empty(&amp;amp;root-&amp;gt;orphan_list)) {
+if (atomic_read(&amp;amp;root-&amp;gt;orphan_inodes)) {
 spin_unlock(&amp;amp;root-&amp;gt;orphan_lock);
 return;
 }
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2166,8 +2166,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int btrfs_orphan_add(struct btrfs_trans_handle *trans, struct inode *inode)
 block_rsv = NULL;
 }
 
-if (list_empty(&amp;amp;BTRFS_I(inode)-&amp;gt;i_orphan)) {
-list_add(&amp;amp;BTRFS_I(inode)-&amp;gt;i_orphan, &amp;amp;root-&amp;gt;orphan_list);
+if (!test_and_set_bit(BTRFS_INODE_HAS_ORPHAN_ITEM,
+      &amp;amp;BTRFS_I(inode)-&amp;gt;runtime_flags)) {
 #if 0
 /*
  * For proper ENOSPC handling, we should do orphan
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2180,6 +2180,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int btrfs_orphan_add(struct btrfs_trans_handle *trans, struct inode *inode)
 insert = 1;
 #endif
 insert = 1;
+atomic_dec(&amp;amp;root-&amp;gt;orphan_inodes);
 }
 
 if (!test_and_set_bit(BTRFS_INODE_ORPHAN_META_RESERVED,
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2197,6 +2198,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int btrfs_orphan_add(struct btrfs_trans_handle *trans, struct inode *inode)
 if (insert &amp;gt;= 1) {
 ret = btrfs_insert_orphan_item(trans, root, btrfs_ino(inode));
 if (ret &amp;amp;&amp;amp; ret != -EEXIST) {
+clear_bit(BTRFS_INODE_HAS_ORPHAN_ITEM,
+  &amp;amp;BTRFS_I(inode)-&amp;gt;runtime_flags);
 btrfs_abort_transaction(trans, root, ret);
 return ret;
 }
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2227,10 +2230,9 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int btrfs_orphan_del(struct btrfs_trans_handle *trans, struct inode *inode)
 int ret = 0;
 
 spin_lock(&amp;amp;root-&amp;gt;orphan_lock);
-if (!list_empty(&amp;amp;BTRFS_I(inode)-&amp;gt;i_orphan)) {
-list_del_init(&amp;amp;BTRFS_I(inode)-&amp;gt;i_orphan);
+if (test_and_clear_bit(BTRFS_INODE_HAS_ORPHAN_ITEM,
+       &amp;amp;BTRFS_I(inode)-&amp;gt;runtime_flags))
 delete_item = 1;
-}
 
 if (test_and_clear_bit(BTRFS_INODE_ORPHAN_META_RESERVED,
        &amp;amp;BTRFS_I(inode)-&amp;gt;runtime_flags))
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2242,8 +2244,10 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int btrfs_orphan_del(struct btrfs_trans_handle *trans, struct inode *inode)
 BUG_ON(ret); /* -ENOMEM or corruption (JDM: Recheck) */
 }
 
-if (release_rsv)
+if (release_rsv) {
 btrfs_orphan_release_metadata(inode);
+atomic_dec(&amp;amp;root-&amp;gt;orphan_inodes);
+}
 
 return 0;
 }
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2371,6 +2375,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int btrfs_orphan_cleanup(struct btrfs_root *root)
 ret = PTR_ERR(trans);
 goto out;
 }
+printk(KERN_ERR "auto deleting %Lu\n",
+       found_key.objectid);
 ret = btrfs_del_orphan_item(trans, root,
     found_key.objectid);
 BUG_ON(ret); /* -ENOMEM or corruption (JDM: Recheck) */
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2382,9 +2388,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int btrfs_orphan_cleanup(struct btrfs_root *root)
  * add this inode to the orphan list so btrfs_orphan_del does
  * the proper thing when we hit it
  */
-spin_lock(&amp;amp;root-&amp;gt;orphan_lock);
-list_add(&amp;amp;BTRFS_I(inode)-&amp;gt;i_orphan, &amp;amp;root-&amp;gt;orphan_list);
-spin_unlock(&amp;amp;root-&amp;gt;orphan_lock);
+set_bit(BTRFS_INODE_HAS_ORPHAN_ITEM,
+&amp;amp;BTRFS_I(inode)-&amp;gt;runtime_flags);
 
 /* if we have links, this was a truncate, lets do that */
 if (inode-&amp;gt;i_nlink) {
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -3706,7 +3711,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; void btrfs_evict_inode(struct inode *inode)
 btrfs_wait_ordered_range(inode, 0, (u64)-1);
 
 if (root-&amp;gt;fs_info-&amp;gt;log_root_recovering) {
-BUG_ON(!list_empty(&amp;amp;BTRFS_I(inode)-&amp;gt;i_orphan));
+BUG_ON(!test_bit(BTRFS_INODE_HAS_ORPHAN_ITEM,
+ &amp;amp;BTRFS_I(inode)-&amp;gt;runtime_flags));
 goto no_delete;
 }
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -6875,7 +6881,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; struct inode *btrfs_alloc_inode(struct super_block *sb)
 mutex_init(&amp;amp;ei-&amp;gt;log_mutex);
 mutex_init(&amp;amp;ei-&amp;gt;delalloc_mutex);
 btrfs_ordered_inode_tree_init(&amp;amp;ei-&amp;gt;ordered_tree);
-INIT_LIST_HEAD(&amp;amp;ei-&amp;gt;i_orphan);
 INIT_LIST_HEAD(&amp;amp;ei-&amp;gt;delalloc_inodes);
 INIT_LIST_HEAD(&amp;amp;ei-&amp;gt;ordered_operations);
 RB_CLEAR_NODE(&amp;amp;ei-&amp;gt;rb_node);
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -6920,13 +6925,12 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; void btrfs_destroy_inode(struct inode *inode)
 spin_unlock(&amp;amp;root-&amp;gt;fs_info-&amp;gt;ordered_extent_lock);
 }
 
-spin_lock(&amp;amp;root-&amp;gt;orphan_lock);
-if (!list_empty(&amp;amp;BTRFS_I(inode)-&amp;gt;i_orphan)) {
+if (test_bit(BTRFS_INODE_HAS_ORPHAN_ITEM,
+     &amp;amp;BTRFS_I(inode)-&amp;gt;runtime_flags)) {
 printk(KERN_INFO "BTRFS: inode %llu still on the orphan list\n",
        (unsigned long long)btrfs_ino(inode));
-list_del_init(&amp;amp;BTRFS_I(inode)-&amp;gt;i_orphan);
+atomic_dec(&amp;amp;root-&amp;gt;orphan_inodes);
 }
-spin_unlock(&amp;amp;root-&amp;gt;orphan_lock);
 
 while (1) {
 ordered = btrfs_lookup_first_ordered_extent(inode, (u64)-1);
&lt;/pre&gt;</description>
    <dc:creator>Josef Bacik</dc:creator>
    <dc:date>2012-05-25T14:10:07</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.file-systems.btrfs/17553">
    <title>[PATCH] Btrfs: convert the inode bit field to use the actual bit operations</title>
    <link>http://comments.gmane.org/gmane.comp.file-systems.btrfs/17553</link>
    <description>&lt;pre&gt;Miao pointed this out while I was working on an orphan problem that messing
with a bitfield where different ranges are protected by different locks
doesn't work out right.  Turns out we've been doing this forever where we
have different parts of the bit field protected by either no lock at all or
different locks which could cause all sorts of weird problems including the
issue I was hitting.  So instead make a runtime_flags thing that we use the
normal bit operations on that are all atomic so we can keep having our
no/different locking for the different flags and then make force_compress
it's own thing so it can be treated normally.  Thanks,

Signed-off-by: Josef Bacik &amp;lt;josef&amp;lt; at &amp;gt;redhat.com&amp;gt;
---
 fs/btrfs/btrfs_inode.h   |   30 ++++++++++++++++--------------
 fs/btrfs/delayed-inode.c |    4 ++--
 fs/btrfs/disk-io.c       |    3 ++-
 fs/btrfs/extent-tree.c   |   11 ++++++-----
 fs/btrfs/file.c          |   12 ++++++------
 fs/btrfs/inode.c         |   28 ++++++++++++----------------
 6 files changed, 44 insertions(+), 44 deletions(-)

diff --git a/fs/btrfs/btrfs_inode.h b/fs/btrfs/btrfs_inode.h
index 3771b85..6265edb 100644
--- a/fs/btrfs/btrfs_inode.h
+++ b/fs/btrfs/btrfs_inode.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -24,6 +24,19 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #include "ordered-data.h"
 #include "delayed-inode.h"
 
+/*
+ * ordered_data_close is set by truncate when a file that used
+ * to have good data has been truncated to zero.  When it is set
+ * the btrfs file release call will add this inode to the
+ * ordered operations list so that we make sure to flush out any
+ * new data the application may have written before commit.
+ */
+#define BTRFS_INODE_ORDERED_DATA_CLOSE0
+#define BTRFS_INODE_ORPHAN_META_RESERVED1
+#define BTRFS_INODE_DUMMY2
+#define BTRFS_INODE_IN_DEFRAG3
+#define BTRFS_INODE_DELALLOC_META_RESERVED4
+
 /* in memory btrfs inode */
 struct btrfs_inode {
 /* which subvolume this inode belongs to */
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -78,6 +91,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; struct btrfs_inode {
 /* the space_info for where this inode's data allocations are done */
 struct btrfs_space_info *space_info;
 
+unsigned long runtime_flags;
+
 /* full 64 bit generation number, struct vfs_inode doesn't have a big
  * enough field for this.
  */
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -142,22 +157,9 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; struct btrfs_inode {
 unsigned reserved_extents;
 
 /*
- * ordered_data_close is set by truncate when a file that used
- * to have good data has been truncated to zero.  When it is set
- * the btrfs file release call will add this inode to the
- * ordered operations list so that we make sure to flush out any
- * new data the application may have written before commit.
- */
-unsigned ordered_data_close:1;
-unsigned orphan_meta_reserved:1;
-unsigned dummy_inode:1;
-unsigned in_defrag:1;
-unsigned delalloc_meta_reserved:1;
-
-/*
  * always compress this one file
  */
-unsigned force_compress:4;
+unsigned force_compress;
 
 struct btrfs_delayed_node *delayed_node;
 
diff --git a/fs/btrfs/delayed-inode.c b/fs/btrfs/delayed-inode.c
index bcd40c7..c18d044 100644
--- a/fs/btrfs/delayed-inode.c
+++ b/fs/btrfs/delayed-inode.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -669,8 +669,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int btrfs_delayed_inode_reserve_metadata(
 return ret;
 } else if (src_rsv == &amp;amp;root-&amp;gt;fs_info-&amp;gt;delalloc_block_rsv) {
 spin_lock(&amp;amp;BTRFS_I(inode)-&amp;gt;lock);
-if (BTRFS_I(inode)-&amp;gt;delalloc_meta_reserved) {
-BTRFS_I(inode)-&amp;gt;delalloc_meta_reserved = 0;
+if (test_and_clear_bit(BTRFS_INODE_DELALLOC_META_RESERVED,
+       &amp;amp;BTRFS_I(inode)-&amp;gt;runtime_flags)) {
 spin_unlock(&amp;amp;BTRFS_I(inode)-&amp;gt;lock);
 release = true;
 goto migrate;
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 19f5b45..0cf8ef2 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2001,7 +2001,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int open_ctree(struct super_block *sb,
 BTRFS_I(fs_info-&amp;gt;btree_inode)-&amp;gt;root = tree_root;
 memset(&amp;amp;BTRFS_I(fs_info-&amp;gt;btree_inode)-&amp;gt;location, 0,
        sizeof(struct btrfs_key));
-BTRFS_I(fs_info-&amp;gt;btree_inode)-&amp;gt;dummy_inode = 1;
+set_bit(BTRFS_INODE_DUMMY,
+&amp;amp;BTRFS_I(fs_info-&amp;gt;btree_inode)-&amp;gt;runtime_flags);
 insert_inode_hash(fs_info-&amp;gt;btree_inode);
 
 spin_lock_init(&amp;amp;fs_info-&amp;gt;block_group_cache_lock);
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index 59ae191..1902726 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -4355,10 +4355,9 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static unsigned drop_outstanding_extent(struct inode *inode)
 BTRFS_I(inode)-&amp;gt;outstanding_extents--;
 
 if (BTRFS_I(inode)-&amp;gt;outstanding_extents == 0 &amp;amp;&amp;amp;
-    BTRFS_I(inode)-&amp;gt;delalloc_meta_reserved) {
+    test_and_clear_bit(BTRFS_INODE_DELALLOC_META_RESERVED,
+       &amp;amp;BTRFS_I(inode)-&amp;gt;runtime_flags))
 drop_inode_space = 1;
-BTRFS_I(inode)-&amp;gt;delalloc_meta_reserved = 0;
-}
 
 /*
  * If we have more or the same amount of outsanding extents than we have
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -4465,7 +4464,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int btrfs_delalloc_reserve_metadata(struct inode *inode, u64 num_bytes)
  * Add an item to reserve for updating the inode when we complete the
  * delalloc io.
  */
-if (!BTRFS_I(inode)-&amp;gt;delalloc_meta_reserved) {
+if (!test_bit(BTRFS_INODE_DELALLOC_META_RESERVED,
+      &amp;amp;BTRFS_I(inode)-&amp;gt;runtime_flags)) {
 nr_extents++;
 extra_reserve = 1;
 }
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -4511,7 +4511,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int btrfs_delalloc_reserve_metadata(struct inode *inode, u64 num_bytes)
 
 spin_lock(&amp;amp;BTRFS_I(inode)-&amp;gt;lock);
 if (extra_reserve) {
-BTRFS_I(inode)-&amp;gt;delalloc_meta_reserved = 1;
+set_bit(BTRFS_INODE_DELALLOC_META_RESERVED,
+&amp;amp;BTRFS_I(inode)-&amp;gt;runtime_flags);
 nr_extents--;
 }
 BTRFS_I(inode)-&amp;gt;reserved_extents += nr_extents;
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
index c9e2bf5..cdc68ff 100644
--- a/fs/btrfs/file.c
+++ b/fs/btrfs/file.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -103,7 +103,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void __btrfs_add_inode_defrag(struct inode *inode,
 goto exists;
 }
 }
-BTRFS_I(inode)-&amp;gt;in_defrag = 1;
+set_bit(BTRFS_INODE_IN_DEFRAG, &amp;amp;BTRFS_I(inode)-&amp;gt;runtime_flags);
 rb_link_node(&amp;amp;defrag-&amp;gt;rb_node, parent, p);
 rb_insert_color(&amp;amp;defrag-&amp;gt;rb_node, &amp;amp;root-&amp;gt;fs_info-&amp;gt;defrag_inodes);
 return;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -131,7 +131,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int btrfs_add_inode_defrag(struct btrfs_trans_handle *trans,
 if (btrfs_fs_closing(root-&amp;gt;fs_info))
 return 0;
 
-if (BTRFS_I(inode)-&amp;gt;in_defrag)
+if (test_bit(BTRFS_INODE_IN_DEFRAG, &amp;amp;BTRFS_I(inode)-&amp;gt;runtime_flags))
 return 0;
 
 if (trans)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -148,7 +148,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int btrfs_add_inode_defrag(struct btrfs_trans_handle *trans,
 defrag-&amp;gt;root = root-&amp;gt;root_key.objectid;
 
 spin_lock(&amp;amp;root-&amp;gt;fs_info-&amp;gt;defrag_inodes_lock);
-if (!BTRFS_I(inode)-&amp;gt;in_defrag)
+if (!test_bit(BTRFS_INODE_IN_DEFRAG, &amp;amp;BTRFS_I(inode)-&amp;gt;runtime_flags))
 __btrfs_add_inode_defrag(inode, defrag);
 else
 kfree(defrag);
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -252,7 +252,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int btrfs_run_defrag_inodes(struct btrfs_fs_info *fs_info)
 goto next;
 
 /* do a chunk of defrag */
-BTRFS_I(inode)-&amp;gt;in_defrag = 0;
+clear_bit(BTRFS_INODE_IN_DEFRAG, &amp;amp;BTRFS_I(inode)-&amp;gt;runtime_flags);
 range.start = defrag-&amp;gt;last_offset;
 num_defrag = btrfs_defrag_file(inode, NULL, &amp;amp;range, defrag-&amp;gt;transid,
        defrag_batch);
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1465,8 +1465,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int btrfs_release_file(struct inode *inode, struct file *filp)
  * flush down new bytes that may have been written if the
  * application were using truncate to replace a file in place.
  */
-if (BTRFS_I(inode)-&amp;gt;ordered_data_close) {
-BTRFS_I(inode)-&amp;gt;ordered_data_close = 0;
+if (test_and_clear_bit(BTRFS_INODE_ORDERED_DATA_CLOSE,
+       &amp;amp;BTRFS_I(inode)-&amp;gt;runtime_flags)) {
 btrfs_add_ordered_operation(NULL, BTRFS_I(inode)-&amp;gt;root, inode);
 if (inode-&amp;gt;i_size &amp;gt; BTRFS_ORDERED_OPERATIONS_FLUSH_LIMIT)
 filemap_flush(inode-&amp;gt;i_mapping);
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 54ae3df..2a5ca50 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2182,10 +2182,9 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int btrfs_orphan_add(struct btrfs_trans_handle *trans, struct inode *inode)
 insert = 1;
 }
 
-if (!BTRFS_I(inode)-&amp;gt;orphan_meta_reserved) {
-BTRFS_I(inode)-&amp;gt;orphan_meta_reserved = 1;
+if (!test_and_set_bit(BTRFS_INODE_ORPHAN_META_RESERVED,
+      &amp;amp;BTRFS_I(inode)-&amp;gt;runtime_flags))
 reserve = 1;
-}
 spin_unlock(&amp;amp;root-&amp;gt;orphan_lock);
 
 /* grab metadata reservation from transaction handle */
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2233,10 +2232,9 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int btrfs_orphan_del(struct btrfs_trans_handle *trans, struct inode *inode)
 delete_item = 1;
 }
 
-if (BTRFS_I(inode)-&amp;gt;orphan_meta_reserved) {
-BTRFS_I(inode)-&amp;gt;orphan_meta_reserved = 0;
+if (test_and_clear_bit(BTRFS_INODE_ORPHAN_META_RESERVED,
+       &amp;amp;BTRFS_I(inode)-&amp;gt;runtime_flags))
 release_rsv = 1;
-}
 spin_unlock(&amp;amp;root-&amp;gt;orphan_lock);
 
 if (trans &amp;amp;&amp;amp; delete_item) {
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -3642,7 +3640,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int btrfs_setsize(struct inode *inode, loff_t newsize)
  * any new writes get down to disk quickly.
  */
 if (newsize == 0)
-BTRFS_I(inode)-&amp;gt;ordered_data_close = 1;
+set_bit(BTRFS_INODE_ORDERED_DATA_CLOSE,
+&amp;amp;BTRFS_I(inode)-&amp;gt;runtime_flags);
 
 /* we don't support swapfiles, so vmtruncate shouldn't fail */
 truncate_setsize(inode, newsize);
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -4102,7 +4101,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static struct inode *new_simple_dir(struct super_block *s,
 
 BTRFS_I(inode)-&amp;gt;root = root;
 memcpy(&amp;amp;BTRFS_I(inode)-&amp;gt;location, key, sizeof(*key));
-BTRFS_I(inode)-&amp;gt;dummy_inode = 1;
+set_bit(BTRFS_INODE_DUMMY, &amp;amp;BTRFS_I(inode)-&amp;gt;runtime_flags);
 
 inode-&amp;gt;i_ino = BTRFS_EMPTY_SUBVOL_DIR_OBJECTID;
 inode-&amp;gt;i_op = &amp;amp;btrfs_dir_ro_inode_operations;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -4406,7 +4405,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int btrfs_write_inode(struct inode *inode, struct writeback_control *wbc)
 int ret = 0;
 bool nolock = false;
 
-if (BTRFS_I(inode)-&amp;gt;dummy_inode)
+if (test_bit(BTRFS_INODE_DUMMY, &amp;amp;BTRFS_I(inode)-&amp;gt;runtime_flags))
 return 0;
 
 if (btrfs_fs_closing(root-&amp;gt;fs_info) &amp;amp;&amp;amp; btrfs_is_free_space_inode(root, inode))
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -4439,7 +4438,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int btrfs_dirty_inode(struct inode *inode)
 struct btrfs_trans_handle *trans;
 int ret;
 
-if (BTRFS_I(inode)-&amp;gt;dummy_inode)
+if (test_bit(BTRFS_INODE_DUMMY, &amp;amp;BTRFS_I(inode)-&amp;gt;runtime_flags))
 return 0;
 
 trans = btrfs_join_transaction(root);
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -6724,7 +6723,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int btrfs_truncate(struct inode *inode)
  * using truncate to replace the contents of the file will
  * end up with a zero length file after a crash.
  */
-if (inode-&amp;gt;i_size == 0 &amp;amp;&amp;amp; BTRFS_I(inode)-&amp;gt;ordered_data_close)
+if (inode-&amp;gt;i_size == 0 &amp;amp;&amp;amp; test_bit(BTRFS_INODE_ORDERED_DATA_CLOSE,
+   &amp;amp;BTRFS_I(inode)-&amp;gt;runtime_flags))
 btrfs_add_ordered_operation(trans, root, inode);
 
 while (1) {
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -6861,11 +6861,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; struct inode *btrfs_alloc_inode(struct super_block *sb)
 ei-&amp;gt;outstanding_extents = 0;
 ei-&amp;gt;reserved_extents = 0;
 
-ei-&amp;gt;ordered_data_close = 0;
-ei-&amp;gt;orphan_meta_reserved = 0;
-ei-&amp;gt;dummy_inode = 0;
-ei-&amp;gt;in_defrag = 0;
-ei-&amp;gt;delalloc_meta_reserved = 0;
+ei-&amp;gt;runtime_flags = 0;
 ei-&amp;gt;force_compress = BTRFS_COMPRESS_NONE;
 
 ei-&amp;gt;delayed_node = NULL;
&lt;/pre&gt;</description>
    <dc:creator>Josef Bacik</dc:creator>
    <dc:date>2012-05-25T14:09:45</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.file-systems.btrfs/17551">
    <title>[PATCH v5 0/3] Btrfs-progs: support get/reset device stats via ioctl</title>
    <link>http://comments.gmane.org/gmane.comp.file-systems.btrfs/17551</link>
    <description>&lt;pre&gt;"btrfs device stats" is used to retrieve and print the device stats.
"btrfs device stats -z" is used to atomically retrieve, reset and
print the stats.

In order to share two utility functions between scrub and the dev stats
code, these two functions are moved to utils.c and renamed.
Since these functions are using open_file_or_dir(), and since the linking
against utils.o and common.o was different, open_file_or_dir() was moved
from common.c to utils.c. And since that function makes use of the
function dirfd(3), the required XOPEN version was raised from 6 to 7.

Changes v1-&amp;gt;v2:
- Remove a verbose printf()
- Cast u64 to unsigned long long for printf()
- Update the man page

Changes v2-&amp;gt;v3:
- Rebase on Chris' current master branch
- Split the patch into three seperate patches because after rebasing,
  open_file_or_dir() was moved and additional changes had been necessary

Changes v3-&amp;gt;v4:
- Add padding at end of ioctl structure

Changes v4-&amp;gt;v5:
- The statistic members in the ioctl are now organized as an array of
  64 bit values. Symbolic names for the array indexes are defined in
  an enum, which also defines the max value

Stefan Behrens (3):
  Btrfs-progs: move open_file_or_dir() to utils.c
  Btrfs-progs: make two utility functions globally available
  Btrfs-progs: add command to get/reset device stats via ioctl

 Makefile         |    4 +-
 btrfsctl.c       |   28 -------------
 cmds-balance.c   |    1 +
 cmds-device.c    |  118 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 cmds-inspect.c   |    1 +
 cmds-scrub.c     |   72 +--------------------------------
 cmds-subvolume.c |    1 +
 commands.h       |    3 --
 common.c         |   46 ---------------------
 ctree.h          |    6 +++
 ioctl.h          |   33 +++++++++++++++
 man/btrfs.8.in   |   14 +++++++
 print-tree.c     |    6 +++
 utils.c          |   97 +++++++++++++++++++++++++++++++++++++++++++-
 utils.h          |    7 ++++
 15 files changed, 286 insertions(+), 151 deletions(-)
 delete mode 100644 common.c

&lt;/pre&gt;</description>
    <dc:creator>Stefan Behrens</dc:creator>
    <dc:date>2012-05-25T14:07:15</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.file-systems.btrfs/17546">
    <title>[PATCH v5 0/3] Btrfs: add IO error device stats</title>
    <link>http://comments.gmane.org/gmane.comp.file-systems.btrfs/17546</link>
    <description>&lt;pre&gt;Changes v1-v2:
- Remove restriction that BTRFS_IOC_GET_DEVICE_STATS is a privileged
  operation
- Cast u64 to unsigned long long for printf()

Changes v2-v3:
- Rebased on Chris' current master

Changes v3-v4:
- Add padding at end of ioctl structure

Changes v4-v5:
- The statistic members in the ioctl are now organized as an array of
  64 bit values. Symbolic names for the array indexes are defined in
  an enum, which also defines the max value. This change makes it
  easier to add new statistic members in the future
- Give ins_len = -1 to btrfs_search_slot() when an item might get
  deleted
- Introduce a helper function for the repeated sequence stat_int() +
  dirty = 1 + stat_print()
- Introduce a helper function for the code that shares the bio
  bi_private member for two pieces of information

The goal is to detect when drives start to get an increased error rate,
when drives should be replaced soon. Therefore statistic counters are
added that count IO errors (read, write and flush). Additionally, the
software detected errors like checksum errors and corrupted blocks are
counted.

An ioctl interface is added to get the device statistic counters.
A second ioctl is added to atomically get and reset these counters.

The device statistics are written into the device tree with each
transaction commit. Only modified statistics are written.
When a filesystem is mounted, the device statistics for each involved
device are read from the device tree and used to initialize the
counters.

A patch for the btrfs-progs world will also be sent.

Stefan Behrens (3):
  Btrfs: add device counters for detected IO and checksum errors
  Btrfs: add ioctl to get and reset the device stats
  Btrfs: read device stats on mount, write modified ones during commit

 fs/btrfs/ctree.h       |   38 ++++++
 fs/btrfs/disk-io.c     |   20 +++-
 fs/btrfs/extent_io.c   |   18 ++-
 fs/btrfs/ioctl.c       |   26 +++++
 fs/btrfs/ioctl.h       |   33 ++++++
 fs/btrfs/print-tree.c  |    3 +
 fs/btrfs/scrub.c       |   65 ++++++++---
 fs/btrfs/transaction.c |    4 +
 fs/btrfs/volumes.c     |  304 +++++++++++++++++++++++++++++++++++++++++++++++-
 fs/btrfs/volumes.h     |   52 +++++++++
 10 files changed, 539 insertions(+), 24 deletions(-)

&lt;/pre&gt;</description>
    <dc:creator>Stefan Behrens</dc:creator>
    <dc:date>2012-05-25T14:06:07</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.file-systems.btrfs/17544">
    <title>[PATCH] Btrfs: don't update atime on RO subvolumes</title>
    <link>http://comments.gmane.org/gmane.comp.file-systems.btrfs/17544</link>
    <description>&lt;pre&gt;Before the update_time inode operation was indroduced, it was
not possible to prevent updates of atime on RO subvolumes.
btrfs_update_time does now check if the root is RO and skip
updating of atime.

This patch requires the update_time patches from Josef
Bacik.

Signed-off-by: Alexander Block &amp;lt;ablock84&amp;lt; at &amp;gt;googlemail.com&amp;gt;
---
 fs/btrfs/inode.c |   26 +++++++++++++++++++++-----
 fs/inode.c       |    3 +++
 2 files changed, 24 insertions(+), 5 deletions(-)

diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 54ae3df..b48db5a 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -4470,14 +4470,30 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int btrfs_dirty_inode(struct inode *inode)
 static int btrfs_update_time(struct inode *inode, struct timespec *now,
      int flags)
 {
-if (flags &amp;amp; S_VERSION)
+struct btrfs_root *root = BTRFS_I(inode)-&amp;gt;root;
+int did_update = 0;
+
+if (flags &amp;amp; S_VERSION) {
 inode_inc_iversion(inode);
-if (flags &amp;amp; S_CTIME)
+did_update = 1;
+}
+if (flags &amp;amp; S_CTIME) {
 inode-&amp;gt;i_ctime = *now;
-if (flags &amp;amp; S_MTIME)
+did_update = 1;
+}
+if (flags &amp;amp; S_MTIME) {
 inode-&amp;gt;i_mtime = *now;
-if (flags &amp;amp; S_ATIME)
-inode-&amp;gt;i_atime = *now;
+did_update = 1;
+}
+if (flags &amp;amp; S_ATIME) {
+/* don't do atime updates on RO subvolumes */
+if (!btrfs_root_readonly(root)) {
+inode-&amp;gt;i_atime = *now;
+did_update = 1;
+}
+}
+if (!did_update)
+return 0;
 return btrfs_dirty_inode(inode);
 }
 
diff --git a/fs/inode.c b/fs/inode.c
index 06d8bd4..949d06f 100644
--- a/fs/inode.c
+++ b/fs/inode.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1545,6 +1545,9 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; void touch_atime(struct path *path)
  * Btrfs), but since we touch atime while walking down the path we
  * really don't care if we failed to update the atime of the file,
  * so just ignore the return value.
+ * Also, the checks done above to see if updating atime is allowed
+ * are not enough for some filesystems. Btrfs for example may have
+ * RO subvolumes on a RW filesystems, which vfs is not aware of.
  */
 update_time(inode, &amp;amp;now, S_ATIME);
 mnt_drop_write(mnt);
&lt;/pre&gt;</description>
    <dc:creator>Alexander Block</dc:creator>
    <dc:date>2012-05-25T12:50:43</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.file-systems.btrfs/17539">
    <title>Btrfs and more compression algorithms</title>
    <link>http://comments.gmane.org/gmane.comp.file-systems.btrfs/17539</link>
    <description>&lt;pre&gt;Hi Chris, Hi Josef,

Hi Btrfs-List and all other Btrfs-devs that I've forgot,


is there a chance we'll see a xz file-compression support in Btrfs
anytime soon ?

I'm sure folks have been waiting for additional compression support
besides gzip and lzo (bzip2 seems out of question due to its slowness,
there's pbzip2 but that's not included in the kernel).

This would be a really nice bonus due to the processors getting faster
and SSD usage is more and more widespread - add an efficient
implementation and

we would have a fast, extremely efficient and feature-rich filesystem.

My current situation is that several of my harddrives are almost
completely full - even with forced gzip-compression - so I thought I'd
asked whether there was any change in the near future ahead.
There's fusecompress but that probably wouldn't end up being as stable
as a btrfs with xz/lzma-support.


Thanks for your consideration and your work on Btrfs !

It got significantly more stable compared to the past :)

(I use it mainly for some small backup hdds;

a troublesome usage however is still suspending-to-ram/to-disk
regularly and with that the partition [I have a dedicated partition
for the portage-tarball of Gentoo Linux]
where the filesystem seems to take some damage where it can't be
written to anymore via rsync (or other programs). The bash session
hangs (and nothing gets written to the partition).
Running scrub revealed no issues. I haven't had a chance to test it
yet with the new btrfs-progs - haven't suspended meanwhile)


Kind Regards

Matt
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo&amp;lt; at &amp;gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

&lt;/pre&gt;</description>
    <dc:creator>Matt</dc:creator>
    <dc:date>2012-05-24T21:28:42</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.file-systems.btrfs/17537">
    <title>[BUG] atime on ro snapshots is updated when it should not</title>
    <link>http://comments.gmane.org/gmane.comp.file-systems.btrfs/17537</link>
    <description>&lt;pre&gt;Hello,

if a snapshot was created with -r and thus is read only, accessing
files in it will update the atime. I would expect that atime is not
updated on ro snapshots.

I tried to find out where the ro check is missing. The problem seems
to be that the vfs is only checking the mount, super block and
i_flags.
As it has no clue about subvolumes, it never checks them. My temporary
solution for me to continue working is atm the patch at the end of
this mail.
Is anyone with more vfs experience able to fix this in a better way?

Thanks,
Alex.

diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 3524978..6f126e0 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -115,6 +115,10 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; void btrfs_update_iflags(struct inode *inode)
                inode-&amp;gt;i_flags |= S_NOATIME;
        if (ip-&amp;gt;flags &amp;amp; BTRFS_INODE_DIRSYNC)
                inode-&amp;gt;i_flags |= S_DIRSYNC;
+
+       if (btrfs_root_readonly(ip-&amp;gt;root)) {
+               inode-&amp;gt;i_flags |= S_NOATIME;
+       }
 }
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo&amp;lt; at &amp;gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

&lt;/pre&gt;</description>
    <dc:creator>Alexander Block</dc:creator>
    <dc:date>2012-05-24T17:12:11</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.file-systems.btrfs/17529">
    <title>Preparing single-disk setup for future multi-disk usage</title>
    <link>http://comments.gmane.org/gmane.comp.file-systems.btrfs/17529</link>
    <description>&lt;pre&gt;Good morning,


I currently have a single-disk setup where I want to use btrfs filesystem. Yet, I expect to add additional disks to this system in the future. Those disks shall be visible to the OS like a single disk, i.e. using multi-disk feature in btrfs. While data shall be striped among those disks in the future, meta data shall be mirrored for better fault tolerance (loss of some data is acceptable, while loss of all data is not acceptable).

btrfs supports multi-disk setups and even adding additional devices at a later point of time. Thus, it is my preferred choice. However, I am puzzled how the mkfs.btrfs command must be parametrized to have RAID1 for meta data and RAID0 for data with just a single disk / partition. Could I simply do mkfs.btrfs -m raid1 -d raid0 /dev/sdaX (where X is the partition number) ?

Unfortunately, I do not have a disk to test it right now. The disk I am planning to use is with the post service still :) . Searching the Web could not reveal a similar scenario. All multi-disk examples assume that you already have multiple disks and not that you are going to have them.

Thank you for your replies to this email (bjoern.wuest&amp;lt; at &amp;gt;gmx.net, I am not subscribed to the mailing lists, thus please do a 'reply all').


Mit freundlichen Grüßen / Kind regards
  Bjoern Wuest

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo&amp;lt; at &amp;gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

&lt;/pre&gt;</description>
    <dc:creator>Björn Wüst</dc:creator>
    <dc:date>2012-05-24T06:05:23</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.file-systems.btrfs/17527">
    <title>[PATCH] Btrfs: fix the same inode id problem when doing auto defragment</title>
    <link>http://comments.gmane.org/gmane.comp.file-systems.btrfs/17527</link>
    <description>&lt;pre&gt;Two files in the different subvolumes may have the same inode id, so
The rb-tree which is used to manage the defragment object must take it
into account. This patch fix this problem.

Signed-off-by: Miao Xie &amp;lt;miaox&amp;lt; at &amp;gt;cn.fujitsu.com&amp;gt;
---
 fs/btrfs/file.c |   45 +++++++++++++++++++++++++++++++++++----------
 1 files changed, 35 insertions(+), 10 deletions(-)

diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
index 23364c1..3d22fd0 100644
--- a/fs/btrfs/file.c
+++ b/fs/btrfs/file.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -65,6 +65,21 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; struct inode_defrag {
 int cycled;
 };
 
+static int __compare_inode_defrag(struct inode_defrag *defrag1,
+  struct inode_defrag *defrag2)
+{
+if (defrag1-&amp;gt;root &amp;gt; defrag2-&amp;gt;root)
+return 1;
+else if (defrag1-&amp;gt;root &amp;lt; defrag2-&amp;gt;root)
+return -1;
+else if (defrag1-&amp;gt;ino &amp;gt; defrag2-&amp;gt;ino)
+return 1;
+else if (defrag1-&amp;gt;ino &amp;lt; defrag2-&amp;gt;ino)
+return -1;
+else
+return 0;
+}
+
 /* pop a record for an inode into the defrag tree.  The lock
  * must be held already
  *
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -87,9 +102,9 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void __btrfs_add_inode_defrag(struct inode *inode,
 parent = *p;
 entry = rb_entry(parent, struct inode_defrag, rb_node);
 
-if (defrag-&amp;gt;ino &amp;lt; entry-&amp;gt;ino)
+if (__compare_inode_defrag(defrag, entry) &amp;lt; 0)
 p = &amp;amp;parent-&amp;gt;rb_left;
-else if (defrag-&amp;gt;ino &amp;gt; entry-&amp;gt;ino)
+else if (__compare_inode_defrag(defrag, entry) &amp;gt; 0)
 p = &amp;amp;parent-&amp;gt;rb_right;
 else {
 /* if we're reinserting an entry for
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -159,28 +174,33 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int btrfs_add_inode_defrag(struct btrfs_trans_handle *trans,
 /*
  * must be called with the defrag_inodes lock held
  */
-struct inode_defrag *btrfs_find_defrag_inode(struct btrfs_fs_info *info, u64 ino,
+struct inode_defrag *btrfs_find_defrag_inode(struct btrfs_fs_info *info,
+     u64 root, u64 ino,
      struct rb_node **next)
 {
 struct inode_defrag *entry = NULL;
+struct inode_defrag tmp;
 struct rb_node *p;
 struct rb_node *parent = NULL;
 
+tmp.ino = ino;
+tmp.root = root;
+
 p = info-&amp;gt;defrag_inodes.rb_node;
 while (p) {
 parent = p;
 entry = rb_entry(parent, struct inode_defrag, rb_node);
 
-if (ino &amp;lt; entry-&amp;gt;ino)
+if (__compare_inode_defrag(&amp;amp;tmp, entry) &amp;lt; 0)
 p = parent-&amp;gt;rb_left;
-else if (ino &amp;gt; entry-&amp;gt;ino)
+else if (__compare_inode_defrag(&amp;amp;tmp, entry) &amp;gt; 0)
 p = parent-&amp;gt;rb_right;
 else
 return entry;
 }
 
 if (next) {
-while (parent &amp;amp;&amp;amp; ino &amp;gt; entry-&amp;gt;ino) {
+while (parent &amp;amp;&amp;amp; __compare_inode_defrag(&amp;amp;tmp, entry) &amp;gt; 0) {
 parent = rb_next(parent);
 entry = rb_entry(parent, struct inode_defrag, rb_node);
 }
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -202,6 +222,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int btrfs_run_defrag_inodes(struct btrfs_fs_info *fs_info)
 struct btrfs_key key;
 struct btrfs_ioctl_defrag_range_args range;
 u64 first_ino = 0;
+u64 root_objectid = 0;
 int num_defrag;
 int defrag_batch = 1024;
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -214,11 +235,14 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int btrfs_run_defrag_inodes(struct btrfs_fs_info *fs_info)
 n = NULL;
 
 /* find an inode to defrag */
-defrag = btrfs_find_defrag_inode(fs_info, first_ino, &amp;amp;n);
+defrag = btrfs_find_defrag_inode(fs_info, root_objectid,
+ first_ino, &amp;amp;n);
 if (!defrag) {
-if (n)
-defrag = rb_entry(n, struct inode_defrag, rb_node);
-else if (first_ino) {
+if (n) {
+defrag = rb_entry(n, struct inode_defrag,
+  rb_node);
+} else if (root_objectid || first_ino) {
+root_objectid = 0;
 first_ino = 0;
 continue;
 } else {
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -228,6 +252,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int btrfs_run_defrag_inodes(struct btrfs_fs_info *fs_info)
 
 /* remove it from the rbtree */
 first_ino = defrag-&amp;gt;ino + 1;
+root_objectid = defrag-&amp;gt;root;
 rb_erase(&amp;amp;defrag-&amp;gt;rb_node, &amp;amp;fs_info-&amp;gt;defrag_inodes);
 
 if (btrfs_fs_closing(fs_info) ||
&lt;/pre&gt;</description>
    <dc:creator>Miao Xie</dc:creator>
    <dc:date>2012-05-24T02:42:19</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.file-systems.btrfs/17525">
    <title>[PATCH] Btrfs: fall back to non-inline if we don't have enough space</title>
    <link>http://comments.gmane.org/gmane.comp.file-systems.btrfs/17525</link>
    <description>&lt;pre&gt;If cow_file_range_inline fails with ENOSPC we abort the transaction which
isn't very nice.  This really shouldn't be happening anyways but there's no
sense in making it a horrible error when we can easily just go allocate
normal data space for this stuff.  Thanks,

Signed-off-by: Josef Bacik &amp;lt;josef&amp;lt; at &amp;gt;redhat.com&amp;gt;
---
 fs/btrfs/inode.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index cd51968..46d8732 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -257,10 +257,13 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static noinline int cow_file_range_inline(struct btrfs_trans_handle *trans,
 ret = insert_inline_extent(trans, root, inode, start,
    inline_len, compressed_size,
    compress_type, compressed_pages);
-if (ret) {
+if (ret &amp;amp;&amp;amp; ret != -ENOSPC) {
 btrfs_abort_transaction(trans, root, ret);
 return ret;
+} else if (ret == -ENOSPC) {
+return 1;
 }
+
 btrfs_delalloc_release_metadata(inode, end + 1 - start);
 btrfs_drop_extent_cache(inode, start, aligned_end - 1, 0);
 return 0;
&lt;/pre&gt;</description>
    <dc:creator>Josef Bacik</dc:creator>
    <dc:date>2012-05-23T20:08:49</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.file-systems.btrfs/17520">
    <title>[PATCH] Btrfs: fix false positive in check-integrity on unmount</title>
    <link>http://comments.gmane.org/gmane.comp.file-systems.btrfs/17520</link>
    <description>&lt;pre&gt;During unmount, it could happen that the integrity checker printed a
warning message "attempt to free ... on umount which is not yet iodone"
which turned out to be a false positive.

Signed-off-by: Stefan Behrens &amp;lt;sbehrens&amp;lt; at &amp;gt;giantdisaster.de&amp;gt;
---
 fs/btrfs/check-integrity.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/btrfs/check-integrity.c b/fs/btrfs/check-integrity.c
index d85b9d1..b5e9891 100644
--- a/fs/btrfs/check-integrity.c
+++ b/fs/btrfs/check-integrity.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -3338,7 +3338,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; void btrfsic_unmount(struct btrfs_root *root,
 btrfsic_block_link_free(l);
 }
 
-if (b_all-&amp;gt;is_iodone)
+if (b_all-&amp;gt;is_iodone || b_all-&amp;gt;never_written)
 btrfsic_block_free(b_all);
 else
 printk(KERN_INFO "btrfs: attempt to free %c-block"
&lt;/pre&gt;</description>
    <dc:creator>Stefan Behrens</dc:creator>
    <dc:date>2012-05-23T16:12:55</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.file-systems.btrfs/17517">
    <title>Cant mount multi-subvolume via fstab</title>
    <link>http://comments.gmane.org/gmane.comp.file-systems.btrfs/17517</link>
    <description>&lt;pre&gt;Hi,

I'm trying mount many subvolume during boot via fstab:

UUID=xxx /usr btrfs subvol=usr,ro,nodev 0 0
UUID=xxx /home btrfs subvol=home,nodev,nosuid 0 0
UUID=xxx /var btrfs subvol=var,nodev 0 0
UUID=xxx /var/tmp btrfs subvol=var-tmp,nodev,noexec,nosuid 0 0

But only the first one is mounted. When try to mount the others
subvolumes, I get this error:

mount: /dev/sda3 already mounted or /home busy
mount: according to mtab, /dev/sda3 is mounted on /usr
mount: /dev/sda3 already mounted or /var busy
mount: according to mtab, /dev/sda3 is mounted on /usr
mount: mount point /var/tmp does not exist

I'm using linux kernel 3.3.6 and mount 2.20 in Debian 7.

&lt;/pre&gt;</description>
    <dc:creator>Rogerio Bastos</dc:creator>
    <dc:date>2012-05-23T15:00:02</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.file-systems.btrfs/17508">
    <title>[BUG] kernel crash when storage goes offline</title>
    <link>http://comments.gmane.org/gmane.comp.file-systems.btrfs/17508</link>
    <description>&lt;pre&gt;Hi!

We are using external SAS storage via LSI MegaRAID SAS 9280-8e
controller.  When storage suddenly goes offline (cable unplug or
expander glitch) the kernel (Fedora 3.3.5-2 64bit) outputs to log lots
of

  kernel: [111163.509223] sd 4:2:2:0: rejecting I/O to offline device

but later crashes with

  ------------[ cut here ]------------
  WARNING: at fs/btrfs/extent-tree.c:4927 __btrfs_free_extent+0x628/0x6d0 [btrfs]()
  Hardware name: S5500WBV
  Modules linked in: binfmt_misc mpt2sas scsi_transport_sas raid_class mptctl mptbase ip6t_REJECT nf_conntrack_ipv4 nf_conntrack_ipv6 nf_defrag_ipv6 nf_defrag_ipv4 xt_state nf_conntrack ip6table_filter ip6_tables btrfs zlib_deflate libcrc32c iTCO_wdt i7core_edac igb edac_core i2c_i801 iTCO_vendor_support ioatdma dca joydev i2c_core ses enclosure megaraid_sas [last unloaded: scsi_wait_scan]
  Pid: 1749, comm: btrfs-transacti Not tainted 3.3.5-2.fc16.x86_64 #1
  Call Trace:
   [&amp;lt;ffffffff81057abf&amp;gt;] warn_slowpath_common+0x7f/0xc0
   [&amp;lt;ffffffff81057b1a&amp;gt;] warn_slowpath_null+0x1a/0x20
   [&amp;lt;ffffffffa00e1328&amp;gt;] __btrfs_free_extent+0x628/0x6d0 [btrfs]
   [&amp;lt;ffffffffa00e53a4&amp;gt;] run_clustered_refs+0x424/0x8f0 [btrfs]
   [&amp;lt;ffffffff810902e1&amp;gt;] ? update_curr+0x141/0x1f0
   [&amp;lt;ffffffffa013372b&amp;gt;] ? find_ref_head+0xab/0xe0 [btrfs]
   [&amp;lt;ffffffffa00e59ee&amp;gt;] btrfs_run_delayed_refs+0x17e/0x4a0 [btrfs]
   [&amp;lt;ffffffffa0110590&amp;gt;] ? btrfs_run_ordered_operations+0x1c0/0x1e0 [btrfs]
   [&amp;lt;ffffffffa00f63f4&amp;gt;] btrfs_commit_transaction+0x94/0x820 [btrfs]
   [&amp;lt;ffffffff8107a7d0&amp;gt;] ? remove_wait_queue+0x50/0x50
   [&amp;lt;ffffffffa00f05ad&amp;gt;] transaction_kthread+0x23d/0x2a0 [btrfs]
  sd 4:2:2:0: rejecting I/O to offline device
  sd 4:2:2:0: rejecting I/O to offline device
   [&amp;lt;ffffffffa00f0370&amp;gt;] ? write_dev_supers+0x270/0x270 [btrfs]
   [&amp;lt;ffffffff81079d83&amp;gt;] kthread+0x93/0xa0
   [&amp;lt;ffffffff815fd6a4&amp;gt;] kernel_thread_helper+0x4/0x10
   [&amp;lt;ffffffff81079cf0&amp;gt;] ? kthread_freezable_should_stop+0x70/0x70
   [&amp;lt;ffffffff815fd6a0&amp;gt;] ? gs_change+0x13/0x13
  ---[ end trace 4fd999c522cb517f ]---
  btrfs unable to find ref byte nr 1241473052672 parent 0 root 7  owner 0 offset 0
  BUG: unable to handle kernel NULL pointer dereference at           (null)
  IP: [&amp;lt;ffffffffa01173e2&amp;gt;] map_private_extent_buffer+0x12/0x150 [btrfs]
  PGD 0
  Oops: 0000 [#1] SMP
  CPU 12
  Modules linked in: binfmt_misc mpt2sas scsi_transport_sas raid_class mptctl mptbase ip6t_REJECT nf_conntrack_ipv4 nf_conntrack_ipv6 nf_defrag_ipv6 nf_defrag_ipv4 xt_state nf_conntrack ip6table_filter ip6_tables btrfs zlib_deflate libcrc32c iTCO_wdt i7core_edac igb edac_core i2c_i801 iTCO_vendor_support ioatdma dca joydev i2c_core ses enclosure megaraid_sas [last unloaded: scsi_wait_scan]
  
  Pid: 1749, comm: btrfs-transacti Tainted: G        W    3.3.5-2.fc16.x86_64 #1 Intel Corporation S5500WBV/S5500WB
  RIP: 0010:[&amp;lt;ffffffffa01173e2&amp;gt;]  [&amp;lt;ffffffffa01173e2&amp;gt;] map_private_extent_buffer+0x12/0x150 [btrfs]
  RSP: 0018:ffff88024cf4daa0  EFLAGS: 00010286
  RAX: 0000000000000000 RBX: 0000000000000065 RCX: ffff88024cf4dad0
  RDX: 0000000000000004 RSI: 000000000000007a RDI: 0000000000000000
  RBP: ffff88024cf4dac0 R08: ffff88024cf4dad8 R09: ffff88024cf4dae0
  R10: 0000000000000000 R11: 0000000000000001 R12: 000000000000007a
  R13: 0000000000000000 R14: 00000000fffffffb R15: 0000000000001000
  FS:  0000000000000000(0000) GS:ffff880267cc0000(0000) knlGS:0000000000000000
  CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
  CR2: 0000000000000000 CR3: 0000000001c05000 CR4: 00000000000006e0
  DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
  DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
  Process btrfs-transacti (pid: 1749, threadinfo ffff88024cf4c000, task ffff8802588e5cc0)
  Stack:
   00000000fffffffb 0000000000000065 000000000000007a 0000000000000000
   ffff88024cf4db10 ffffffffa010caac ffff88024cf4db20 ffff88024cf4dae0
   0000000000000007 000001210d8f7000 0000000000000000 ffff88044f00fab0
  Call Trace:
   [&amp;lt;ffffffffa010caac&amp;gt;] btrfs_item_size+0x3c/0x90 [btrfs]
   [&amp;lt;ffffffffa00e0f32&amp;gt;] __btrfs_free_extent+0x232/0x6d0 [btrfs]
   [&amp;lt;ffffffffa00e53a4&amp;gt;] run_clustered_refs+0x424/0x8f0 [btrfs]
   [&amp;lt;ffffffff810902e1&amp;gt;] ? update_curr+0x141/0x1f0
   [&amp;lt;ffffffffa013372b&amp;gt;] ? find_ref_head+0xab/0xe0 [btrfs]
   [&amp;lt;ffffffffa00e59ee&amp;gt;] btrfs_run_delayed_refs+0x17e/0x4a0 [btrfs]
   [&amp;lt;ffffffffa00f63f4&amp;gt;] btrfs_commit_transaction+0x94/0x820 [btrfs]
   [&amp;lt;ffffffff8107a7d0&amp;gt;] ? remove_wait_queue+0x50/0x50
   [&amp;lt;ffffffffa00f05ad&amp;gt;] transaction_kthread+0x23d/0x2a0 [btrfs]
   [&amp;lt;ffffffffa00f0370&amp;gt;] ? write_dev_supers+0x270/0x270 [btrfs]
   [&amp;lt;ffffffff81079d83&amp;gt;] kthread+0x93/0xa0
   [&amp;lt;ffffffff815fd6a4&amp;gt;] kernel_thread_helper+0x4/0x10
  sd 4:2:2:0: rejecting I/O to offline device
   [&amp;lt;ffffffff81079cf0&amp;gt;] ? kthread_freezable_should_stop+0x70/0x70
   [&amp;lt;ffffffff815fd6a0&amp;gt;] ? gs_change+0x13/0x13
  Code: 83 c0 01 48 89 85 78 ff ff ff e9 c0 fc ff ff 66 2e 0f 1f 84 00 00 00 00 00 55 48 89 e5 41 55 41 54 53 48 83 ec 08 66 66 66 66 90 &amp;lt;4c&amp;gt; 8b 27 4d 89 cd 48 89 cb 41 81 e4 ff 0f 00 00 4a 8d 04 26 4c
  RIP  [&amp;lt;ffffffffa01173e2&amp;gt;] map_private_extent_buffer+0x12/0x150 [btrfs]
   RSP &amp;lt;ffff88024cf4daa0&amp;gt;
  CR2: 0000000000000000
  ---[ end trace 4fd999c522cb5180 ]---


I hope this will be useful.

Regards,

&lt;/pre&gt;</description>
    <dc:creator>Tomash Brechko</dc:creator>
    <dc:date>2012-05-23T08:56:21</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.file-systems.btrfs/17502">
    <title>Could btrfs-restore be extended to also restore file dates?</title>
    <link>http://comments.gmane.org/gmane.comp.file-systems.btrfs/17502</link>
    <description>&lt;pre&gt;Any possibility of getting btrfs-restore to also restore the files
timestamp?

I'm doing a restore right now as I had one btrfs partition blow up and
I'm noting that the timestamps are marking all the restored files as
new. It would be nice to be able to do a quick compare of file dates to
determine any changed files that may be newer on the restore vs the
backup. (I can save full file compares for when the server is not being
actively used.)

I do realize it is possible that there could be other issues, but for
quickly determining potential issues this could be useful.

I do realize that there may be technical reasons for the current
behavior, so at the very least this is suggestion for future
functionality even if it doesn't help me.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo&amp;lt; at &amp;gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

&lt;/pre&gt;</description>
    <dc:creator>Henry Bakker</dc:creator>
    <dc:date>2012-05-22T21:42:05</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.file-systems.btrfs/17501">
    <title>SSD erase state and reducing SSD wear</title>
    <link>http://comments.gmane.org/gmane.comp.file-systems.btrfs/17501</link>
    <description>&lt;pre&gt;I've got two recent examples of SSDs. Their pristine state from the
manufacturer shows:


Device Model:     OCZ-VERTEX3

# hexdump -C /dev/sdd
00000000  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
|................|
*
1bf2976000


Device Model:     OCZ VERTEX PLUS
(OCZ VERTEX 2E)

# hexdump -C /dev/sdd
00000000 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
|................|
*
df99e6000



What's a good way to test what state they get erased to from a TRIM
operation?

Can btrfs detect the erase state and pad unused space in filesystem
writes with the same value so as to reduce SSD wear?

Regards,
Martin

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo&amp;lt; at &amp;gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

&lt;/pre&gt;</description>
    <dc:creator>Martin</dc:creator>
    <dc:date>2012-05-22T21:47:42</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.comp.file-systems.btrfs">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.comp.file-systems.btrfs</link>
  </textinput>
</rdf:RDF>

