On Sun, Apr 19, 2015 at 9:15 PM, Joel Best wrote:
> Hi all, We have recently had major issues with our large btrfs volume
> crashing and remounting read-only because it thinks it's out of space. The
> volume is 55TB on h/w raid 6 with 44TB free and the server is running Ubuntu
> 14.04 server x64.
On 20-04-15 06:27, Zygo Blaxell wrote:
>> I'm curious as to whether +C has any effect on BTRFS's durability, too.
>
> I would expect it to be strictly equal to or worse than the CoW
> durability.
In addition to the stuff pointed out, I've wondered about this:
PostgreSQL full_page_writes copies 8
This introduces BTRFS_IOC_RM_DEV_V2, which can accept devid as
an argument to delete the device.
Current only choice to is to pass device path for the device delete
cli, but if btrfs is unable to read device SB, then cli fails. And
user won't be able to delete the device.
With this patch now the
Current method to identify and verify the user provided device_path
needs device SB to be accessible. In situations where SB isn't accessible
or read fails. Using devid will help.
Anand Jain (1):
Btrfs: device delete by devid
fs/btrfs/ioctl.c | 50
This patch introduces new option for the command
btrfs device delete [..]
In a user reported issue on a 3-disk-RAID1, one disk failed with its
SB unreadable. Now with this patch user will have a choice to delete
the device using devid.
The other method we could do, is to match the input dev
Signed-off-by: Anand Jain
---
cmds-replace.c | 11 ---
utils-lib.c| 11 +++
utils.h| 1 +
3 files changed, 12 insertions(+), 11 deletions(-)
diff --git a/cmds-replace.c b/cmds-replace.c
index 63d34f9..6ea7c61 100644
--- a/cmds-replace.c
+++ b/cmds-replace.c
@@ -65,17
Signed-off-by: Anand Jain
---
Documentation/btrfs-device.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/btrfs-device.txt b/Documentation/btrfs-device.txt
index 4bb5ea5..0bc1be3 100644
--- a/Documentation/btrfs-device.txt
+++ b/Documentation/btrfs-device.txt
Use inode_set_flags() instead of set_mask_bits() according to
commit 5f16f3225b062 ("ext4: atomically set inode->i_flags in
ext4_set_inode_flags()").
Signed-off-by: Zhang Zhen
---
fs/btrfs/ioctl.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/fs/btrfs/ioctl.c b/fs/btrf
Use inode_set_flags() instead of set_mask_bits() according to
commit 5f16f3225b062 ("ext4: atomically set inode->i_flags in
ext4_set_inode_flags()").
Signed-off-by: Zhang Zhen
---
fs/btrfs/ioctl.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/fs/btrfs/ioctl.c b/fs/btrf
NeilBrown wrote:
> + .fs_flags = FS_REQUIRES_DEV | FS_BINARY_MOUNTDATA |
> + FS_SUPPORTS_SEEK_HOLE,
I must be missing something:
warthog>git merge linus/master
Already up-to-date.
warthog>stg id
09d51602cf84a1264946711dd4ea0dddbac5
NeilBrown wrote:
> I managed to reproduce the bug, and when I applied your patches I cannot any
> more. So it looks like you've fixed it - thanks.
I hope so too. Now I just hope Linus takes the patches.
> That just leave the bmap issue. I'll post a patch which causes lseek to be
> used when
On Mon, 20 Apr 2015 09:47:42 +0100 David Howells wrote:
> NeilBrown wrote:
>
> > + .fs_flags = FS_REQUIRES_DEV | FS_BINARY_MOUNTDATA |
> > + FS_SUPPORTS_SEEK_HOLE,
>
> I must be missing something:
>
> warthog>git merge linus/master
> Already up-to-date.
On Mon, Apr 20, 2015 at 04:27:00PM +1000, NeilBrown wrote:
> A worthwhile goal, but I certainly wouldn't consider pursuing it until what I
> have submitted so far as been accepted - let's not reject "good" while
> waiting for "perfect".
It's still broken. You add conditional flag for the almost r
NeilBrown wrote:
> Missing patch 2 of the 3-patch series?
Yes. :-)
Do ext4 and xfs support this, do you know?
David
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/maj
On Mon, Apr 20, 2015 at 10:46:49AM +0100, David Howells wrote:
> NeilBrown wrote:
>
> > Missing patch 2 of the 3-patch series?
>
> Yes. :-)
>
> Do ext4 and xfs support this, do you know?
Yes. As do f2fs, ocfs2, gfs2, ceph and NFSv4.2
>
> David
---end quoted text---
--
To unsubscribe from th
On 31/03/2015 19:05, David Sterba wrote:
> On Mon, Mar 30, 2015 at 05:09:52PM +0200, Marc Cousin wrote:
>>> So it would be good to sample the active threads and see where it's
>>> spending the time. It could be the somewhere in the rb-tree representing
>>> extents, but that's a guess.
>>>
>> I just
Hello everyone,
I have an issue with my ssd where a btrfs partition is located. I have a
/dev/sdb1 in ext4 for the /boot, and the rest of the ssd is /dev/sdb2
which is the root of my Archlinux. When I boot, it hangs up after
loading the kernel. So I tried with an Archlinux liveboot, and I have
the
On Mon, Apr 20, 2015 at 12:16:33PM +0200, "Némoz Saint-Dizier, Olivier" wrote:
> Hello everyone,
>
> I have an issue with my ssd where a btrfs partition is located. I have a
> /dev/sdb1 in ext4 for the /boot, and the rest of the ssd is /dev/sdb2
> which is the root of my Archlinux. When I boot, it
Oh, I didn't see there were similar link in the wiki, my bad.
Thank you for your prompt answer :)
Olivier.
On 4/20/2015 12:27 PM, Hugo Mills wrote:
> On Mon, Apr 20, 2015 at 12:16:33PM +0200, "Némoz Saint-Dizier, Olivier" wrote:
>> Hello everyone,
>>
>> I have an issue with my ssd where a btrfs p
On Mon, 20 Apr 2015 12:16:33 +0200, Némoz Saint-Dizier, Olivier wrote:
> Hello everyone,
>
> I have an issue with my ssd where a btrfs partition is located. I have a
> /dev/sdb1 in ext4 for the /boot, and the rest of the ssd is /dev/sdb2
> which is the root of my Archlinux. When I boot, it hangs
NeilBrown wrote:
> @@ -721,24 +733,45 @@ int cachefiles_read_or_alloc_pages(struct
> fscache_retrieval *op,
We can actually do better than this what you've done here for
cachefiles_read_or_alloc_pages(). We can use SEEK_DATA to check the beginning
of a run of pages and then SEEK_HOLE to see ho
Anand Jain posted on Mon, 20 Apr 2015 18:31:29 +0800 as excerpted:
> Signed-off-by: Anand Jain
> ---
> Documentation/btrfs-device.txt | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Documentation/btrfs-device.txt
> b/Documentation/btrfs-device.txt index 4bb5ea5..0bc1be3
Hi,
the last one added missing goto. I'll try to make clear differences
next time :)
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
On Mon, Apr 20, 2015 at 02:48:55AM -0700, Christoph Hellwig wrote:
> On Mon, Apr 20, 2015 at 10:46:49AM +0100, David Howells wrote:
> > NeilBrown wrote:
> >
> > > Missing patch 2 of the 3-patch series?
> >
> > Yes. :-)
> >
> > Do ext4 and xfs support this, do you know?
>
> Yes. As do f2fs, oc
Miguel Negrão wrote (ao):
> - Given that I'm running a laptop and comunicating with the harddrives via
> USB, is it expected that I will get some corruption from time to time or is
> this abnormal
Abnormal. I have three Intel ssd's usb connected to an Arndale. Two of
them have luks and btrfs raid
Hi,
I have a subvolume with only one file (file.txt) with 5Mb size.
under /btrfs/subvol1/
1)
I have created 1st snapshot /btrfs/snap1_subvol1. Then I ran "btrfs
send" and given -f out1.img
size of out1.img is 5Mb.
2)
Next, I have appended 1Mb data to file.txt
And again created snapshot /btrfs/
On 20-04-2015 15:07, Sander wrote:
> Miguel Negrão wrote (ao):
>> - Given that I'm running a laptop and comunicating with the harddrives via
>> USB, is it expected that I will get some corruption from time to time or is
>> this abnormal
>
> Abnormal. I have three Intel ssd's usb connected to an A
On Mon, Apr 20, 2015 at 02:15:47PM +, sri wrote:
> Hi,
>
> I have a subvolume with only one file (file.txt) with 5Mb size.
> under /btrfs/subvol1/
> 1)
> I have created 1st snapshot /btrfs/snap1_subvol1. Then I ran "btrfs
> send" and given -f out1.img
>
> size of out1.img is 5Mb.
>
> 2)
> N
On 4/20/15 12:33 AM, xuw2...@gmail.com wrote:
> From: George Wang
>
> PPC64 arch use such following IOC values "
> \#define _IOC_NONE 1U
> \#define _IOC_READ 2U
> \#define _IOC_WRITE 4U
> " comparing to the default IOC values "
> \#define _IOC_NONE 0U
> \#define _IOC_READ
On Mon, Apr 20, 2015 at 10:27:05AM +, Hugo Mills wrote:
>See the first issue here: https://btrfs.wiki.kernel.org/index.php/Gotchas
Hi Hugo, looking at the page again, I see
"bcache + btrfs does not seem to be stable yet"
linking to a thread more than 2 years old and btrfs kernels that
wou
On Mon, Apr 20, 2015 at 10:13:47AM +0200, Gian-Carlo Pascutto wrote:
> On 20-04-15 06:27, Zygo Blaxell wrote:
>
> >> I'm curious as to whether +C has any effect on BTRFS's durability, too.
> >
> > I would expect it to be strictly equal to or worse than the CoW
> > durability.
>
> In addition to
I'm one of those that used to have problems with btrfs on top of bcache.
After some corruptions, I gave up this setup.
Recently (from February, I think) I gave it another shot, and I have
had no problems since.
I use bcache in writeback mode, with very good performance. I'm
feeling btrfs very stab
Here's a test patch that makes better use of SEEK_DATA/SEEK_HOLE in
cachefiles_read_or_alloc_pages() by caching data/hole information to use on
the subsequent pages in the list.
Note that the pages list needs to be transited in reverse for this to work as
it seems that the list passed to the fs is
On Mon, 2015-04-20 at 05:23 +, Duncan wrote:
> Which, given the common developer wisdom about premature optimization,
> can be explained. But accepting that explanation, one is still stymied
> by the fact that all the previous warnings about btrfs being in heavy
> development, keep good ba
On 04/20/2015 01:27 AM, NeilBrown wrote:
> This allows fscache to cachefiles in a btrfs filesystem.
Thanks for working on this Neil.
Signed-off-by: Chris Mason
-chris
>
> Signed-off-by: NeilBrown
> ---
> fs/btrfs/super.c |3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff
On Mon, Apr 6, 2015 at 10:09 PM, Davide Italiano wrote:
> - We call inode_size_ok() only if FL_KEEP_SIZE isn't specified.
> - As an optimisation we can skip the call if (off + len)
> isn't greater than the current size of the file. This operation
> is called under the lock so the less work we
Hi folks,
Reporting this here too as per the "How do I report bugs and issues?"
section on the wiki.
I managed to trigger the following BUG_ON() whilst running 'apt purge':-
[ 85.635305] kernel BUG at fs/btrfs/ctree.c:3163!
[ 85.635350] invalid opcode: [#1] SMP
[ 85.635398] Modules li
See also https://bugzilla.kernel.org/show_bug.cgi?id=96971
I've identified some problems in the btrfs code and attached a
btrfs-image which causes the userland tools to crash and the kernel to
immediately freeze once the filesystem get's mounted and one of the
files is accessed. Putting the image
On Mon, Apr 20, 2015 at 06:07:09AM +, Duncan wrote:
> 4.0 is out. There's reason people may want to stick one version back by
> default, to 3.19 currently, since it can take a few weeks for early
> reports to develop into a coherent problem, and sticking one stable
> series back allows for
Thanks for review.
On Mon, Apr 20, 2015 at 10:47 PM, Eric Sandeen wrote:
> On 4/20/15 12:33 AM, xuw2...@gmail.com wrote:
>> From: George Wang
>> This means the value "_IOW*" will be negative when we store it in the int
>> variables. Such as the "BTRFS_IOC_QGROUP_CREATE", it will be "0x4010942e"
Original Message
Subject: Carefully crafted BTRFS-image causes kernel to crash
From: Lukas Lueg
To:
Date: 2015年04月21日 07:04
See also https://bugzilla.kernel.org/show_bug.cgi?id=96971
I've identified some problems in the btrfs code and attached a
btrfs-image which causes
From: Anand Jain
Signed-off-by: Anand Jain
---
v1->v2: Oh no. Typo while fixing typo. oops ! thanks Duncan.
Documentation/btrfs-device.txt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Documentation/btrfs-device.txt b/Documentation/btrfs-device.txt
index 4bb5ea5..780
As long as the inode is intact, the file metadata can be restored.
Directory data is restored at the end of search_dir. Errors are
checked and returned, unless ignore_errors is requested.
Signed-off-by: Dan Merillat
---
Documentation/btrfs-restore.txt | 3 ++
cmds-restore.c |
Changes since v1:
* Documented in the manpage
* Added to usage() for btrfs restore
* Made it an optional flag (-m/--restore-metadata)
* Use endian-safe macros to access the on-disk data.
* Restore the proper mtime instead of atime twice.
* Restore owner and mode
* Restore metadata for directories
[BRIEF]
This patchset mainly introduces a new qgroup mechanism, which is
originally used to fix a bug in fstest/btrfs/057.
[WORKFLOW]
The new mechanism works like the following:
0) Previous transaction is done.
The new mechanism highly depends on commit_transaction.
So without commit_transac
Old __merge_refs() in backref.c will even merge refs whose root_id are
different, which makes qgroup gives wrong result.
Fix it by checking ref_for_same_block() before any mode specific works.
Signed-off-by: Qu Wenruo
---
fs/btrfs/backref.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletio
Add function qgroup_update_counters(), which will update related
qgroups' rfer/excl according to old/new_roots.
This is one of the two core functions for the new qgroup implement.
This is based on btrfs_adjust_coutners() but with clearer logic and
comment.
Signed-off-by: Qu Wenruo
---
fs/btrfs
This is used by later qgroup fix patches for snapshot.
As current snapshot accounting is done by btrfs_qgroup_inherit(), but
new extent oriented quota mechanism will account extent from
btrfs_copy_root() and other snapshot things, causing wrong result.
So add this ability to handle snapshot accou
Use inline functions to do such things, to improve readability.
Signed-off-by: Qu Wenruo
Acked-by: David Sterba
---
fs/btrfs/qgroup.c | 95 +++
1 file changed, 54 insertions(+), 41 deletions(-)
diff --git a/fs/btrfs/qgroup.c b/fs/btrfs/qgroup
Cleanup the rb_tree merge/insert/update functions, since now we use list
instead of rb_tree now.
Signed-off-by: Qu Wenruo
---
fs/btrfs/delayed-ref.c | 174 -
1 file changed, 174 deletions(-)
diff --git a/fs/btrfs/delayed-ref.c b/fs/btrfs/delayed-r
Since the self test transaction don't have delayed_ref_roots, so use
find_all_roots() and export btrfs_qgroup_account_extent() to simulate it
Signed-off-by: Qu Wenruo
---
fs/btrfs/qgroup.c | 2 +-
fs/btrfs/qgroup.h | 5 ++
fs/btrfs/tests/qgroup-tests.c | 109 +
This function will delete unode with given (val,aux) pair.
And with this patch, seqnum for debug usage doesn't have any meaning
now, so remove them.
This is used by later patches to skip snapshot root.
Signed-off-by: Qu Wenruo
---
fs/btrfs/ulist.c | 47 --
Switch from old ref_node based qgroup to extent based qgroup mechanism
for normal operations.
The new mechanism should hugely reduce the overhead of btrfs quota
system, and further more, the codes and logic should be more clean and
easier to maintain.
Signed-off-by: Qu Wenruo
---
fs/btrfs/exten
The new btrfs_qgroup_account_extents() function should be called in
btrfs_commit_transaction() and it will update all the qgroup according
to delayed_ref_root->dirty_extent_root.
The new function can handle both normal operation during
commit_transaction() or in rescan in a unified method with cle
This function is used to update refcnt for qgroups.
And is one of the two core functions used in the new qgroup implement.
This is based on the old update_old/new_refcnt, but provides a unified
logic and behavior.
Signed-off-by: Qu Wenruo
---
fs/btrfs/qgroup.c | 58 +
Add function btrfs_qgroup_prepare_account_extents() to get old_roots
which are needed for qgroup.
We do it in commit_transaction() and before switch_roots(), and only
search commit_root, so it gives a quite accurate view for previous
transaction.
With old_roots from previous transaction, we can u
Make snapshot accounting work with new extent-oriented mechanism by
skipping given root in new/old_roots in create_pending_snapshot().
Signed-off-by: Qu Wenruo
---
fs/btrfs/transaction.c | 53 +++---
1 file changed, 33 insertions(+), 20 deletions(-)
d
Goodbye, the old mechanisim.
Signed-off-by: Qu Wenruo
---
fs/btrfs/ctree.h | 2 +-
fs/btrfs/extent-tree.c | 5 -
fs/btrfs/qgroup.c| 905 +--
fs/btrfs/qgroup.h| 49 ---
include/trace/events/btrfs.h | 55 ---
5
Add hook in add_delayed_ref_head() to record quota-related extent record
into delayed_ref_root->dirty_extent_record rb-tree for later qgroup
accounting.
Signed-off-by: Qu Wenruo
---
fs/btrfs/delayed-ref.c | 58 --
fs/btrfs/delayed-ref.h | 3 +++
f
Allow btrfs_find_all_roots() to skip all delayed_ref_head lock and tree
lock to do tree search.
This is important for later qgroup implement which will call
find_all_roots() after fs trees are committed.
Signed-off-by: Qu Wenruo
---
fs/btrfs/backref.c | 35 +--
1
Switch rescan to use the new new extent oriented mechanism.
As rescan is also based on extent, new mechanism is just a perfect match
for rescan.
With re-designed internal functions, rescan is quite easy, just call
btrfs_find_all_roots() and then btrfs_qgroup_account_one_extent().
Signed-off-by:
__btrfs_inc_extent_ref() and __btrfs_free_extent() have already had too
many parameters, but three of them can be extracted from
btrfs_delayed_ref_node struct.
So use btrfs_delayed_ref_node struct as a single parameter to replace
the bytenr/num_byte/no_quota parameters.
The real objective of this
This patch replace the rbtree used in ref_head to list.
This has the following advantage:
1) Easier merge logic.
With the new list implement, we only need to care merging the tail
ref_node with the new ref_node.
And this can be done quite easy at insert time, no need to do a
indicated merge at run_
63 matches
Mail list logo