<?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://permalink.gmane.org/gmane.comp.file-systems.btrfs/17530"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.file-systems.btrfs/17529"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.file-systems.btrfs/17527"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.file-systems.btrfs/17526"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.file-systems.btrfs/17525"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.file-systems.btrfs/17524"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.file-systems.btrfs/17522"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.file-systems.btrfs/17521"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.file-systems.btrfs/17520"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.file-systems.btrfs/17519"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.file-systems.btrfs/17518"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.file-systems.btrfs/17517"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.file-systems.btrfs/17516"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.file-systems.btrfs/17515"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.file-systems.btrfs/17514"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.file-systems.btrfs/17513"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.file-systems.btrfs/17511"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.file-systems.btrfs/17509"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.file-systems.btrfs/17508"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.file-systems.btrfs/17507"/>
      </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://permalink.gmane.org/gmane.comp.file-systems.btrfs/17530">
    <title>Re: Preparing single-disk setup for future multi-disk usage</title>
    <link>http://permalink.gmane.org/gmane.comp.file-systems.btrfs/17530</link>
    <description>&lt;pre&gt;
you can use sparse files. Possibly with losetup, if necessary.


That's not the email you use to send


IMHO asking something to a list and then saying "I am not subscribed"
and "send your reply to this other email address that I'm not using to
send" is rude.

&lt;/pre&gt;</description>
    <dc:creator>Fajar A. Nugraha</dc:creator>
    <dc:date>2012-05-24T06:18:50</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.file-systems.btrfs/17529">
    <title>Preparing single-disk setup for future multi-disk usage</title>
    <link>http://permalink.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://permalink.gmane.org/gmane.comp.file-systems.btrfs/17527">
    <title>[PATCH] Btrfs: fix the same inode id problem when doing auto defragment</title>
    <link>http://permalink.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://permalink.gmane.org/gmane.comp.file-systems.btrfs/17526">
    <title>Re: [PATCH 2/2] Btrfs: resize all devices when we dont assign a specific device id</title>
    <link>http://permalink.gmane.org/gmane.comp.file-systems.btrfs/17526</link>
    <description>&lt;pre&gt;


Hi,

It is quite easy to do what you expect, but IMO that will confuse users a lot...

With this patch, you can still assign a specific dev id to resize what you want :)

thanks,
liubo



--
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>Liu Bo</dc:creator>
    <dc:date>2012-05-24T02:15:36</dc:date>
  </item>
  <item rdf:about="http://permalink.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://permalink.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://permalink.gmane.org/gmane.comp.file-systems.btrfs/17524">
    <title>Re: SSD erase state and reducing SSD wear</title>
    <link>http://permalink.gmane.org/gmane.comp.file-systems.btrfs/17524</link>
    <description>&lt;pre&gt;


It's very unlikely that the firmware in any modern high-performance SSD
would ever do an in-place read-modify-write sequence. If you write data
to the same sector on the disc twice, it is more likely to actually
write to two different places in the flash.

A flash erase block typically won't be re-used until all of the data
that had been in it gets rewritten somewhere else. The Indilinx
controller in the Vertex 1 drives have a garbage collector that runs in
the background to look for flash erase blocks that have been partially
rewritten, and consolidate the remaining data from multiple blocks into
one block to free new space for future writing.


It is certainly possible that this could be the case. The difference is
likely to be fairly minimal. But unless you are an SSD manufacturer,
you'll probably never know how much actual difference it would make :)

&lt;/pre&gt;</description>
    <dc:creator>Calvin Walton</dc:creator>
    <dc:date>2012-05-23T19:50:57</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.file-systems.btrfs/17522">
    <title>Re: Cant mount multi-subvolume via fstab</title>
    <link>http://permalink.gmane.org/gmane.comp.file-systems.btrfs/17522</link>
    <description>&lt;pre&gt;Hi Rogerio,

On 05/23/2012 05:00 PM, Rogerio Bastos wrote:

I did some tests. It seems that the problem is that you want to mount
different subvolumes *of the same filesystem* (/dev/sda3) both in RO
(first entry) and RW (the other entries).

Please try to removing the 'RO' for the first entry, and let know us
what happens.

BR
Goffredo


--
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>Goffredo Baroncelli</dc:creator>
    <dc:date>2012-05-23T17:31:49</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.file-systems.btrfs/17521">
    <title>Re: Cant mount multi-subvolume via fstab</title>
    <link>http://permalink.gmane.org/gmane.comp.file-systems.btrfs/17521</link>
    <description>&lt;pre&gt;Quoting Hugo Mills &amp;lt;hugo&amp;lt; at &amp;gt;carfax.org.uk&amp;gt;:


I have two partitions:

/dev/sda1 (top-level)  # root filesystem


/dev/sda3 (top-level)
    `--- home
    `--- var
    `--- var-tmp
    `--- usr


The sda3's top-level isn't being mounted.

&lt;/pre&gt;</description>
    <dc:creator>ROGERIO DE CARVALHO BASTOS</dc:creator>
    <dc:date>2012-05-23T16:24:30</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.file-systems.btrfs/17520">
    <title>[PATCH] Btrfs: fix false positive in check-integrity on unmount</title>
    <link>http://permalink.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://permalink.gmane.org/gmane.comp.file-systems.btrfs/17519">
    <title>Re: SSD erase state and reducing SSD wear</title>
    <link>http://permalink.gmane.org/gmane.comp.file-systems.btrfs/17519</link>
    <description>&lt;pre&gt;
So for that example of reading an 'empty' drive, the OCZ-VERTEX3 might
not even be reading the flash chips at all!...



Very good comment, thanks. That leaves a very good question of how the
Sandforce controller uses the flash. Does it implement its own 'virtual
block level' interface to then use the underlying flash using structures
that are not visible externally?

What does that do to concerns about alignment?...

And for what granularity of write chunks?



My understanding is that the 'wear' mechanism in flash is a problem of
charge getting trapped in the insulation material itself that surrounds
the floating gate of a cell. The permanently trapped charge accumulates
further for each change of state until a high enough offset voltage has
accumulated to exceed what can be tolerated for correct operation of the
cell.

Hence, writing the *same value* as that for already stored for a cell
should not cause any wear being as you are not changing the state of a
cell. (No change in charge levels.)

For non-Sandforce controllers, that suggests doing a read-modify-write
to pad out whatever minimum sized write chunk. That would be rather poor
for performance, and the manufacturer's secrecy means we cannot be sure
of the underlying write block size for minimum sized alignment.


Alternatively, padding out writes with the erased state value means that
no further wear should be caused for when that block is eventually
TRIMed/erased for rewriting.

That should also be a 'soft' option for the Sandforce controllers in
that /hopefully/ their compression/deduplication will compress down the
padding so as not to be a problem.

(Damn the Manufacturer's secrecy!)


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-23T15:44:39</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.file-systems.btrfs/17518">
    <title>Re: Cant mount multi-subvolume via fstab</title>
    <link>http://permalink.gmane.org/gmane.comp.file-systems.btrfs/17518</link>
    <description>&lt;pre&gt;
   How are your subvolumes arranged?

   If you have:

top-level            # default subvolume mounted as /
        `--- home
        `--- usr
        `--- var
               `--- tmp

and you are mounting / first, then you don't need to mount the
subvolumes, as they're already visible within /  I'm not quite sure
what the consequences of mounting a subvolume directly onto itself as
a mountpoint are -- but it may have this effect.

   If you have:

top-level
        `--- root    # default subvolume mounted as /
        `--- home
        `--- usr

then you should be able to (and have to) mount them separately.

   Hugo.

&lt;/pre&gt;</description>
    <dc:creator>Hugo Mills</dc:creator>
    <dc:date>2012-05-23T15:33:16</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.file-systems.btrfs/17517">
    <title>Cant mount multi-subvolume via fstab</title>
    <link>http://permalink.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://permalink.gmane.org/gmane.comp.file-systems.btrfs/17516">
    <title>Re: Ceph on btrfs 3.4rc</title>
    <link>http://permalink.gmane.org/gmane.comp.file-systems.btrfs/17516</link>
    <description>&lt;pre&gt;
Ok give this a shot, it should do it.  Thanks,

Josef


diff --git a/fs/btrfs/btrfs_inode.h b/fs/btrfs/btrfs_inode.h
index 9b9b15f..41ddec8 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,22 &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
+#define BTRFS_INODE_HAS_ORPHAN_ITEM5
+#define BTRFS_INODE_FORCE_ZLIB6
+#define BTRFS_INODE_FORCE_LZO7
+
 /* in memory btrfs inode */
 struct btrfs_inode {
 /* which subvolume this inode belongs to */
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -57,9 +73,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.
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -143,24 +156,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; struct btrfs_inode {
  */
 unsigned outstanding_extents;
 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 long runtime_flags;
 
 struct btrfs_delayed_node *delayed_node;
 
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index 8fd7233..aad2600 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/delayed-inode.c b/fs/btrfs/delayed-inode.c
index 03e3748..5190861 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 a7ffc88..0ddeb0d 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;
&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 49fd7b6..b372040 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 53bf2d7..2f19fe9 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; -1466,8 +1466,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 61b16c6..1d42dba 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -109,6 +109,15 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int btrfs_init_inode_security(struct btrfs_trans_handle *trans,
 return err;
 }
 
+static int btrfs_inode_force_compress(struct inode *inode)
+{
+if (test_bit(BTRFS_INODE_FORCE_ZLIB, &amp;amp;BTRFS_I(inode)-&amp;gt;runtime_flags))
+return BTRFS_COMPRESS_ZLIB;
+if (test_bit(BTRFS_INODE_FORCE_LZO, &amp;amp;BTRFS_I(inode)-&amp;gt;runtime_flags))
+return BTRFS_COMPRESS_LZO;
+return BTRFS_COMPRESS_NONE;
+}
+
 /*
  * this does all the hard work for inserting an inline extent into
  * the btree.  The caller should have done a btrfs_drop_extents so that
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -396,7 +405,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; again:
  */
 if (!(BTRFS_I(inode)-&amp;gt;flags &amp;amp; BTRFS_INODE_NOCOMPRESS) &amp;amp;&amp;amp;
     (btrfs_test_opt(root, COMPRESS) ||
-     (BTRFS_I(inode)-&amp;gt;force_compress) ||
+     btrfs_inode_force_compress(inode) ||
      (BTRFS_I(inode)-&amp;gt;flags &amp;amp; BTRFS_INODE_COMPRESS))) {
 WARN_ON(pages);
 pages = kzalloc(sizeof(struct page *) * nr_pages, GFP_NOFS);
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -405,8 +414,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; again:
 goto cont;
 }
 
-if (BTRFS_I(inode)-&amp;gt;force_compress)
-compress_type = BTRFS_I(inode)-&amp;gt;force_compress;
+if (btrfs_inode_force_compress(inode))
+compress_type = btrfs_inode_force_compress(inode);
 
 ret = btrfs_compress_pages(compress_type,
    inode-&amp;gt;i_mapping, start,
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -514,7 +523,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; cont:
 
 /* flag the file so we don't compress in the future */
 if (!btrfs_test_opt(root, FORCE_COMPRESS) &amp;amp;&amp;amp;
-    !(BTRFS_I(inode)-&amp;gt;force_compress)) {
+    !btrfs_inode_force_compress(inode)) {
 BTRFS_I(inode)-&amp;gt;flags |= BTRFS_INODE_NOCOMPRESS;
 }
 }
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1365,7 +1374,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int run_delalloc_range(struct inode *inode, struct page *locked_page,
 ret = run_delalloc_nocow(inode, locked_page, start, end,
  page_started, 0, nr_written);
 else if (!btrfs_test_opt(root, COMPRESS) &amp;amp;&amp;amp;
- !(BTRFS_I(inode)-&amp;gt;force_compress) &amp;amp;&amp;amp;
+ !btrfs_inode_force_compress(inode) &amp;amp;&amp;amp;
  !(BTRFS_I(inode)-&amp;gt;flags &amp;amp; BTRFS_INODE_COMPRESS))
 ret = cow_file_range(inode, locked_page, start, end,
       page_started, nr_written, 1);
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2072,12 +2081,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; -2134,8 +2143,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; -2148,12 +2157,12 &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_inc(&amp;amp;root-&amp;gt;orphan_inodes);
 }
 
-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; -2166,6 +2175,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; -2195,26 +2206,33 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int btrfs_orphan_del(struct btrfs_trans_handle *trans, struct inode *inode)
 int release_rsv = 0;
 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);
+/*
+ * evict_inode gets called without holding the i_mutex so we need to
+ * take the orphan lock to make sure we are safe in messing with these.
+ */
+if (trans &amp;amp;&amp;amp; test_and_clear_bit(BTRFS_INODE_HAS_ORPHAN_ITEM,
+&amp;amp;BTRFS_I(inode)-&amp;gt;runtime_flags))
 delete_item = 1;
-}
 
-if (BTRFS_I(inode)-&amp;gt;orphan_meta_reserved) {
-BTRFS_I(inode)-&amp;gt;orphan_meta_reserved = 0;
+if (trans &amp;amp;&amp;amp; 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) {
 ret = btrfs_del_orphan_item(trans, root, btrfs_ino(inode));
+if (ret)
+printk(KERN_ERR "couldn't find orphan item for %Lu, nlink %d, root %Lu, root being deleted %s\n",
+       btrfs_ino(inode), inode-&amp;gt;i_nlink, root-&amp;gt;objectid,
+       root-&amp;gt;orphan_item_inserted ? "yes" : "no");
 BUG_ON(ret); /* -ENOMEM or corruption (JDM: Recheck) */
 }
 
 if (release_rsv)
 btrfs_orphan_release_metadata(inode);
 
+if (trans &amp;amp;&amp;amp; delete_item)
+atomic_dec(&amp;amp;root-&amp;gt;orphan_inodes);
+
 return 0;
 }
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2341,6 +2359,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; -2352,9 +2372,9 &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);
+atomic_inc(&amp;amp;root-&amp;gt;orphan_inodes);
 
 /* 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; -3607,7 +3627,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; -3671,7 +3692,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; -4066,7 +4088,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; -4370,7 +4392,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; -4403,7 +4425,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; -6685,7 +6707,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int btrfs_truncate(struct inode *inode)
 
 ret = btrfs_truncate_page(inode-&amp;gt;i_mapping, inode-&amp;gt;i_size);
 if (ret)
-return ret;
+goto real_out;
 
 btrfs_wait_ordered_range(inode, inode-&amp;gt;i_size &amp;amp; (~mask), (u64)-1);
 btrfs_ordered_update_i_size(inode, inode-&amp;gt;i_size, NULL);
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -6727,8 +6749,10 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int btrfs_truncate(struct inode *inode)
  * updating the inode.
  */
 rsv = btrfs_alloc_block_rsv(root);
-if (!rsv)
-return -ENOMEM;
+if (!rsv) {
+ret = -ENOMEM;
+goto real_out;
+}
 rsv-&amp;gt;size = min_size;
 
 /*
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -6771,7 +6795,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; -6847,7 +6872,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; end_trans:
 
 out:
 btrfs_free_block_rsv(root, rsv);
-
+real_out:
 if (ret &amp;amp;&amp;amp; !err)
 err = ret;
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -6909,12 +6934,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;force_compress = BTRFS_COMPRESS_NONE;
+ei-&amp;gt;runtime_flags = 0;
 
 ei-&amp;gt;delayed_node = NULL;
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -6927,7 +6947,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; -6972,13 +6991,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);
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 14f8e1f..a901654 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1039,6 +1039,21 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; out:
 
 }
 
+static void btrfs_set_inode_force_compress(struct inode *inode,
+   int compress_type)
+{
+if (compress_type == BTRFS_COMPRESS_ZLIB) {
+set_bit(BTRFS_INODE_FORCE_ZLIB, &amp;amp;BTRFS_I(inode)-&amp;gt;runtime_flags);
+} else if (compress_type == BTRFS_COMPRESS_LZO) {
+set_bit(BTRFS_INODE_FORCE_LZO, &amp;amp;BTRFS_I(inode)-&amp;gt;runtime_flags);
+} else if (compress_type == BTRFS_COMPRESS_NONE) {
+clear_bit(BTRFS_INODE_FORCE_ZLIB,
+  &amp;amp;BTRFS_I(inode)-&amp;gt;runtime_flags);
+clear_bit(BTRFS_INODE_FORCE_LZO,
+  &amp;amp;BTRFS_I(inode)-&amp;gt;runtime_flags);
+}
+}
+
 int btrfs_defrag_file(struct inode *inode, struct file *file,
       struct btrfs_ioctl_defrag_range_args *range,
       u64 newer_than, unsigned long max_to_defrag)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1162,7 +1177,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int btrfs_defrag_file(struct inode *inode, struct file *file,
 }
 
 if (range-&amp;gt;flags &amp;amp; BTRFS_DEFRAG_RANGE_COMPRESS)
-BTRFS_I(inode)-&amp;gt;force_compress = compress_type;
+btrfs_set_inode_force_compress(inode, compress_type);
 
 if (i + cluster &amp;gt; ra_index) {
 ra_index = max(i, ra_index);
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1230,7 +1245,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int btrfs_defrag_file(struct inode *inode, struct file *file,
 atomic_dec(&amp;amp;root-&amp;gt;fs_info-&amp;gt;async_submit_draining);
 
 mutex_lock(&amp;amp;inode-&amp;gt;i_mutex);
-BTRFS_I(inode)-&amp;gt;force_compress = BTRFS_COMPRESS_NONE;
+btrfs_set_inode_force_compress(inode, BTRFS_COMPRESS_NONE);
 mutex_unlock(&amp;amp;inode-&amp;gt;i_mutex);
 }
 
--
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>Josef Bacik</dc:creator>
    <dc:date>2012-05-23T15:02:36</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.file-systems.btrfs/17515">
    <title>Re: [PATCH v4 3/3] Btrfs: read device stats on mount, write modified ones during commit</title>
    <link>http://permalink.gmane.org/gmane.comp.file-systems.btrfs/17515</link>
    <description>&lt;pre&gt;
I am sure you mean to set ins_len (the 5th parameter) to -1 and you are
right. Thanks for this finding! I will send a v5.


[...]
--
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>Stefan Behrens</dc:creator>
    <dc:date>2012-05-23T14:48:54</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.file-systems.btrfs/17514">
    <title>Re: [PATCH v4 2/3] Btrfs: add ioctl to get and reset the device stats</title>
    <link>http://permalink.gmane.org/gmane.comp.file-systems.btrfs/17514</link>
    <description>&lt;pre&gt;
The check at the end of btrfs_get_device_stats() should use this number:




Padding has landed, and thanks for the explanation in the V3, I see how
the compatibility works.


I think that 'reset device' should go into the structure, besides the
ioctl number there is no difference.

Then the permission check will look like:


 void __user *arg)


if (sa-&amp;gt;reset_after_read &amp;amp;&amp;amp; !capable(CAP_SYS_ADMIN)) {
kfree(sa);


}

So the EINVAL could come earlier than EPERM, but I don't think it's a
problem.


david
--
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>David Sterba</dc:creator>
    <dc:date>2012-05-23T14:32:52</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.file-systems.btrfs/17513">
    <title>Re: Could btrfs-restore be extended to also restore file dates?</title>
    <link>http://permalink.gmane.org/gmane.comp.file-systems.btrfs/17513</link>
    <description>&lt;pre&gt;I'm sure restoring all those fields would be functionality that most
server admins would want. If anyone on this list can add it, then you
have my thanks.

On 5/23/2012 3:07 AM, David Sterba wrote:
--
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-23T14:13:34</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.file-systems.btrfs/17511">
    <title>Re: [PATCH v4 1/3] Btrfs: add device counters for detected IO and checksum errors</title>
    <link>http://permalink.gmane.org/gmane.comp.file-systems.btrfs/17511</link>
    <description>&lt;pre&gt;
this sequence repeats several times (with a slight change), IMHO it asks
for a helper.

void stat_inc(... *device, atomic_inc *cnt) {
atomic_inc(cntr);
device-&amp;gt;device_stats_dirty = 1;
btrfs_device_stat_print_on_error(device);
}

usage:

stat_inc(device, &amp;amp;device-&amp;gt;cnt_write_io_errs);

I think it's unavoidable to leave out the 'device' parameter without a
macro trickery, but as there are only 2 params, it don't it's needed.



I suggest do use a helper for all the "var &amp;amp; 3" places, and comment why
is it so and what are the limitations. I can see from the code below
that it encodes number of devices and fails for &amp;gt; 3.


eg.

unsigned int dev_nr = bio_private_to_nr_dev(bio);



otherwise ok,
david
--
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>David Sterba</dc:creator>
    <dc:date>2012-05-23T14:00:29</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.file-systems.btrfs/17509">
    <title>Re: Could btrfs-restore be extended to also restore file dates?</title>
    <link>http://permalink.gmane.org/gmane.comp.file-systems.btrfs/17509</link>
    <description>&lt;pre&gt;
Quick look, yes it is possible and quite straightforward. The function
restore.c:copy_file has direct access to the found on-disk inode item
and can access the time fileds, then simply setting them for the file.
Maybe it could restore more, like uid, gid or mode.


david
--
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>David Sterba</dc:creator>
    <dc:date>2012-05-23T09:07:48</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.file-systems.btrfs/17508">
    <title>[BUG] kernel crash when storage goes offline</title>
    <link>http://permalink.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://permalink.gmane.org/gmane.comp.file-systems.btrfs/17507">
    <title>Re: [PATCH 2/2] Btrfs: resize all devices when we dont assign a specific device id</title>
    <link>http://permalink.gmane.org/gmane.comp.file-systems.btrfs/17507</link>
    <description>&lt;pre&gt;Hi

On 05/17/2012 02:08 PM, Liu Bo wrote:


I am not sure that this is a sane default for all resizing.

If the user want to resize to MAX, I agree that it is a sane default,
but when the user want to shrink or enlarge of a fixed quantity, the
user should specific the dev id. Because the shrinking and or the
enlarging should be evaluated case by case.

My suggestion is to change the code at kernel level so in case of
multi-volume file-system the user *has* to specify the device to shrink
and/or enlarge.
Should be the user space btrfs tool to handle the check and the growing
(i.e: if the new size is max, automatically grow all the device up to
max; otherwise the user should specific the device to shrink and/or
enlarge).

BR
Goffredo



--
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>Goffredo Baroncelli</dc:creator>
    <dc:date>2012-05-23T05:21:10</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.file-systems.btrfs/17506">
    <title>Re: SSD erase state and reducing SSD wear</title>
    <link>http://permalink.gmane.org/gmane.comp.file-systems.btrfs/17506</link>
    <description>&lt;pre&gt;



This pristine state probably matches up with the result of a trim
command on the drive. In particular, a freshly erased flash block is in
a state where the bits are all 1, so the Vertex Plus drive is showing
you the flash contents directly. The Vertex 3 has substantially more
processing, and the 0s are effectively generated on the fly for unmapped
flash blocks (similar to how the missing portions of a sparse file
contains 0s).


On the Vertex 3, this wouldn't actually do what you'd hope. The firmware
in that drive actually compresses, deduplicates, and encrypts all the
data prior to writing it to flash - and as a result the data that hits
the flash looks nothing like what the filesystem wrote.
(For best performance, it might make sense to disable btrfs's built-in
compression on the Vertex 3 drive to allow the drive's compression to
kick in. Let us know if you benchmark it either way.)

The benefit to doing this on the Vertex Plus is probably fairly small,
since to rewrite a block - even if the block is partially unwritten - is
still likely to require a read-modify-write cycle with an erase step.
The granularity of the erase blocks is just too big for the savings to
be very meaningful.

&lt;/pre&gt;</description>
    <dc:creator>Calvin Walton</dc:creator>
    <dc:date>2012-05-23T04:19:37</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>

