Chris Murphy posted on Fri, 31 Aug 2018 13:02:16 -0600 as excerpted:
> If you want you can post the output from 'sudo smartctl -x /dev/sda'
> which will contain more information... but this is in some sense
> superfluous. The problem is very clearly a bad drive, the drive
> explicitly report to
On Thu, Aug 30, 2018 at 01:42:20PM -0400, Josef Bacik wrote:
> We may abort the transaction during a commit and not have a chance to
> run the pending bgs stuff, which will leave block groups on our list and
> cause us accounting issues and leaked memory. Fix this by running the
> pending bgs
On Thu, Aug 30, 2018 at 01:42:19PM -0400, Josef Bacik wrote:
> We still need to do all of the accounting cleanup for pending block
> groups if we abort. So set the ret to trans->aborted so if we aborted
> the cleanup happens and everybody is happy.
Reviewed-by: Omar Sandoval
Reusing the loop
On Thu, Aug 30, 2018 at 01:42:11PM -0400, Josef Bacik wrote:
> I noticed in a giant dbench run that we spent a lot of time on lock
> contention while running transaction commit. This is because dbench
> results in a lot of fsync()'s that do a btrfs_transaction_commit(), and
> they all run the
On Thu, Aug 30, 2018 at 01:42:13PM -0400, Josef Bacik wrote:
> I ran into an issue where there was some reference being held on an
> inode that I couldn't track. This assert wasn't triggered, but it at
> least rules out we're doing something stupid.
Reviewed-by: Omar Sandoval
> Signed-off-by:
On Thu, Aug 30, 2018 at 01:41:59PM -0400, Josef Bacik wrote:
> If we're allocating a new space cache inode it's likely going to be
> under a transaction handle, so we need to use memalloc_nofs_save() in
> order to avoid deadlocks, and more importantly lockdep messages that
> make xfstests fail.
On Thu, Aug 30, 2018 at 01:41:58PM -0400, Josef Bacik wrote:
> We want to release the unused reservation we have since it refills the
> delayed refs reserve, which will make everything go smoother when
> running the delayed refs if we're short on our reservation.
Reviewed-by: Omar Sandoval
>
On Thu, Aug 30, 2018 at 01:42:12PM -0400, Josef Bacik wrote:
> We can actually allocate new chunks while we're creating our bg's, so
> instead of doing list_for_each_safe, just do while (!list_empty()) so we
> make sure to catch any new bg's that get added to the list.
Reviewed-by: Omar Sandoval
On Thu, Aug 30, 2018 at 01:41:56PM -0400, Josef Bacik wrote:
> may_commit_transaction will skip committing the transaction if we don't
> have enough pinned space or if we're trying to find space for a SYSTEM
> chunk. However if we have pending free block groups in this transaction
> we still want
On Thu, Aug 30, 2018 at 01:41:53PM -0400, Josef Bacik wrote:
> From: Josef Bacik
>
> Unify the extent_op handling as well, just add a flag so we don't
> actually run the extent op from check_ref_cleanup and instead return a
> value so that we can skip cleaning up the ref head.
>
>
On Thu, Aug 30, 2018 at 01:41:52PM -0400, Josef Bacik wrote:
> From: Josef Bacik
>
> We were missing some quota cleanups in check_ref_cleanup, so break the
> ref head accounting cleanup into a helper and call that from both
> check_ref_cleanup and cleanup_ref_head. This will hopefully ensure
From: Omar Sandoval
The documentation for these functions is wrong in several ways:
- swap_activate() is called with the inode locked
- swap_activate() takes a swap_info_struct * and a sector_t *
- swap_activate() can also return a positive number of extents it added
itself
-
From: Omar Sandoval
Hi,
This series implements swap file support for Btrfs.
Changes since v4 [1]:
- Added a kernel doc for btrfs_get_chunk_map()
- Got rid of "Btrfs: push EXCL_OP set into btrfs_rm_device()"
- Made activate error messages more clear and consistent
- Changed clear vs unlock
From: Omar Sandoval
When a swap file is active, we must make sure that the extents of the
file are not moved and that they don't become shared. That means that
the following are not safe:
- chattr +c (enable compression)
- reflink
- dedupe
- snapshot
- defrag
- balance
- device
From: Omar Sandoval
Implement the swap file a_ops on Btrfs. Activation needs to make sure
that the file can be used as a swap file, which currently means it must
be fully allocated as nocow with no compression on one device. It also
sets up the swap extents directly with add_swap_extent(), so
From: Omar Sandoval
Btrfs will need this for swap file support.
Signed-off-by: Omar Sandoval
---
mm/swapfile.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/mm/swapfile.c b/mm/swapfile.c
index d3f95833d12e..51cb30de17bc 100644
--- a/mm/swapfile.c
+++ b/mm/swapfile.c
@@ -2365,6 +2365,7
From: Omar Sandoval
The SWP_FILE flag serves two purposes: to make swap_{read,write}page()
go through the filesystem, and to make swapoff() call
->swap_deactivate(). For Btrfs, we want the latter but not the former,
so split this flag into two. This makes us always call
->swap_deactivate() if
From: Omar Sandoval
The Btrfs swap code is going to need it, so give it a btrfs_ prefix and
make it non-static.
Signed-off-by: Omar Sandoval
---
fs/btrfs/volumes.c | 22 +++---
fs/btrfs/volumes.h | 9 +
2 files changed, 20 insertions(+), 11 deletions(-)
diff --git
If you want you can post the output from 'sudo smartctl -x /dev/sda'
which will contain more information... but this is in some sense
superfluous. The problem is very clearly a bad drive, the drive
explicitly report to libata a write error, and included the sector LBA
affected, and only the drive
On Fri, Aug 31, 2018 at 10:35 AM, Pierre Couderc wrote:
>
> Aug 31 17:34:55 server su[559]: Successful su for root by nous
> Aug 31 17:34:55 server su[559]: + /dev/pts/1 nous:root
> Aug 31 17:34:55 server su[559]: pam_unix(su:session): session opened for
> user root by nous(uid=1000)
> Aug 31
btrfs-progs v4.17.1
man btrfs-scrub:
-R
print raw statistics per-device instead of a summary
However, on a two device Btrfs volume, -R does not show per device
statistics. See screenshot:
https://drive.google.com/open?id=1xmt_NHGlNJPc8I0F4_OZxgGe9b3quCnD
Alberto Bursi posted on Fri, 31 Aug 2018 14:54:46 + as excerpted:
> I just keep around a USB drive with a full Linux system on it, to act as
> "recovery". If the btrfs raid fails I boot into that and I can do
> maintenance with a full graphical interface and internet access so I can
> google
When trying to build a RAID1 on main fs. After normal debian stretch
install :
root@server:/home/nous# btrfs device add /dev/sdb1 /
root@server:/home/nous# btrfs fi show
Label: none uuid: ef0b9dad-c0eb-4a3b-9b41-e5e249363abc
Total devices 2 FS bytes used 824.60MiB
devid 1
On 08/31/2018 04:54 PM, Alberto Bursi wrote:
On 8/31/2018 8:53 AM, Pierre Couderc wrote:
OK, I have understood the message... I was planning that as you said
"semi-routinely", and I understand btrfs is not soon enough ready, and
I am very very far to be a specialist as you are.
So, I shall
On 8/31/2018 8:53 AM, Pierre Couderc wrote:
>
> OK, I have understood the message... I was planning that as you said
> "semi-routinely", and I understand btrfs is not soon enough ready, and
> I am very very far to be a specialist as you are.
> So, I shall mount my RAID1 very standard, and I
On Fri, Aug 31, 2018 at 10:57:45AM +0300, Nikolay Borisov wrote:
>
>
> On 30.08.2018 20:41, Josef Bacik wrote:
> > From: Josef Bacik
> >
> > We do this dance in cleanup_ref_head and check_ref_cleanup, unify it
> > into a helper and cleanup the calling functions.
> >
> > Signed-off-by: Josef
On Fri, Aug 31, 2018 at 10:55:22AM +0300, Nikolay Borisov wrote:
>
>
> On 30.08.2018 20:42, Josef Bacik wrote:
> > We want to have a complete picture of any delayed inode updates before
> > we make the decision to commit or not, so make sure we run delayed iputs
> > before making the decision to
On Fri, Aug 31, 2018 at 10:53:54AM +0300, Nikolay Borisov wrote:
>
>
> On 30.08.2018 20:41, Josef Bacik wrote:
> > For enospc_debug having the block rsvs is super helpful to see if we've
> > done something wrong.
> >
> > Signed-off-by: Josef Bacik
> > ---
> > fs/btrfs/extent-tree.c | 15
On Fri, Aug 31, 2018 at 10:52:55AM +0300, Nikolay Borisov wrote:
>
>
> On 30.08.2018 20:41, Josef Bacik wrote:
> > From: Josef Bacik
> >
> > We use this number to figure out how many delayed refs to run, but
> > __btrfs_run_delayed_refs really only checks every time we need a new
> > delayed
On Fri, Aug 31, 2018 at 10:48:58AM +0300, Nikolay Borisov wrote:
>
>
> On 30.08.2018 20:42, Josef Bacik wrote:
> > We may abort the transaction during a commit and not have a chance to
> > run the pending bgs stuff, which will leave block groups on our list and
> > cause us accounting issues and
On Fri, Aug 31, 2018 at 10:46:36AM +0300, Nikolay Borisov wrote:
>
>
> On 30.08.2018 20:42, Josef Bacik wrote:
> > We still need to do all of the accounting cleanup for pending block
> > groups if we abort. So set the ret to trans->aborted so if we aborted
> > the cleanup happens and everybody
On Fri, Aug 31, 2018 at 10:42:13AM +0300, Nikolay Borisov wrote:
>
>
> On 30.08.2018 20:42, Josef Bacik wrote:
> > We weren't doing any of the accounting cleanup when we aborted
> > transactions. Fix this by making cleanup_ref_head_accounting global and
> > calling it from the abort code, this
On Fri, Aug 31, 2018 at 10:31:49AM +0300, Nikolay Borisov wrote:
>
>
> On 30.08.2018 20:42, Josef Bacik wrote:
> > We can actually allocate new chunks while we're creating our bg's, so
> > instead of doing list_for_each_safe, just do while (!list_empty()) so we
> > make sure to catch any new
On 30.08.2018 20:41, Josef Bacik wrote:
> From: Josef Bacik
>
> We do this dance in cleanup_ref_head and check_ref_cleanup, unify it
> into a helper and cleanup the calling functions.
>
> Signed-off-by: Josef Bacik
> ---
> fs/btrfs/delayed-ref.c | 14 ++
>
On 30.08.2018 20:42, Josef Bacik wrote:
> We want to have a complete picture of any delayed inode updates before
> we make the decision to commit or not, so make sure we run delayed iputs
> before making the decision to commit or not.
Again, there was request for more detail which is not
On 30.08.2018 20:41, Josef Bacik wrote:
> For enospc_debug having the block rsvs is super helpful to see if we've
> done something wrong.
>
> Signed-off-by: Josef Bacik
> ---
> fs/btrfs/extent-tree.c | 15 +++
> 1 file changed, 15 insertions(+)
>
> diff --git
On 30.08.2018 20:41, Josef Bacik wrote:
> From: Josef Bacik
>
> We use this number to figure out how many delayed refs to run, but
> __btrfs_run_delayed_refs really only checks every time we need a new
> delayed ref head, so we always run at least one ref head completely no
> matter what the
On 30.08.2018 20:42, Josef Bacik wrote:
> We may abort the transaction during a commit and not have a chance to
> run the pending bgs stuff, which will leave block groups on our list and
> cause us accounting issues and leaked memory. Fix this by running the
> pending bgs when we cleanup a
On 30.08.2018 20:42, Josef Bacik wrote:
> We still need to do all of the accounting cleanup for pending block
> groups if we abort. So set the ret to trans->aborted so if we aborted
> the cleanup happens and everybody is happy.
>
> Signed-off-by: Josef Bacik
> ---
> fs/btrfs/extent-tree.c |
On 30.08.2018 20:42, Josef Bacik wrote:
> The first thing we do is loop through the list, this
>
> if (!list_empty())
> btrfs_create_pending_block_groups();
>
> thing is just wasted space.
>
> Signed-off-by: Josef Bacik
Makes sense, although it would have been ideal if this patch
On 30.08.2018 20:42, Josef Bacik wrote:
> We weren't doing any of the accounting cleanup when we aborted
> transactions. Fix this by making cleanup_ref_head_accounting global and
> calling it from the abort code, this fixes the issue where our
> accounting was all wrong after the fs aborts.
>
On 30.08.2018 20:42, Josef Bacik wrote:
> Instead of open coding this stuff use the helper instead.
>
> Signed-off-by: Josef Bacik
Reviewed-by: Nikolay Borisov
> ---
> fs/btrfs/disk-io.c | 7 +--
> 1 file changed, 1 insertion(+), 6 deletions(-)
>
> diff --git a/fs/btrfs/disk-io.c
On 30.08.2018 20:42, Josef Bacik wrote:
> We have this open coded in btrfs_destroy_delayed_refs, use the helper
> instead.
>
> Signed-off-by: Josef Bacik
Reviewed-by: Nikolay Borisov
> ---
> fs/btrfs/disk-io.c | 11 ++-
> 1 file changed, 2 insertions(+), 9 deletions(-)
>
> diff
On 30.08.2018 20:42, Josef Bacik wrote:
> We don't need the trans except to get the delayed_refs_root, so just
> pass the delayed_refs_root into btrfs_delayed_ref_lock and call it a
> day.
>
> Signed-off-by: Josef Bacik
Reviewed-by: Nikolay Borisov
> ---
> fs/btrfs/delayed-ref.c | 5 +
On 30.08.2018 20:42, Josef Bacik wrote:
> We can actually allocate new chunks while we're creating our bg's, so
> instead of doing list_for_each_safe, just do while (!list_empty()) so we
> make sure to catch any new bg's that get added to the list.
HOw can this occur, please elaborate and put
On 08/31/2018 04:29 AM, Duncan wrote:
Chris Murphy posted on Thu, 30 Aug 2018 11:08:28 -0600 as excerpted:
My purpose is a simple RAID1 main fs, with bootable flag on the 2 disks
in prder to start in degraded mode
Good luck with this. The Btrfs archives are full of various limitations
On 08/30/2018 07:08 PM, Chris Murphy wrote:
On Thu, Aug 30, 2018 at 3:13 AM, Pierre Couderc wrote:
Trying to install a RAID1 on a debian stretch, I made some mistake and got
this, after installing on disk1 and trying to add second disk :
root@server:~# fdisk -l
Disk /dev/sda: 1.8 TiB,
47 matches
Mail list logo