On Mon, Aug 21, 2017 at 11:19 PM, Robert LeBlanc wrote:
> Chris and Qu thanks for your help. I was able to restore the data off
> the volume. I only could not read one file that I tried to rsync (a
> MySQl bin log), but it wasn't critical as I had an off-site snapshot
> from
As comment pointed out by David, make in-place exit
to a common exit block of mkfs.
v1:
Add some close(fd) when error occures in mkfs.
And add close(fd) when end use it.
Signed-off-by: Gu Jinxiang
---
mkfs/main.c | 74
Chris and Qu thanks for your help. I was able to restore the data off
the volume. I only could not read one file that I tried to rsync (a
MySQl bin log), but it wasn't critical as I had an off-site snapshot
from that morning and ownclould could resync the files that were
changed anyway. This
On Mon, Aug 21, 2017 at 10:55 PM, Rich Rauenzahn wrote:
> I'm getting messages like this when mounting:
>
> [4.034300] BTRFS info (device sdg3): bdev /dev/sdg3 errs: wr 0, rd
> 0, flush 0, corrupt 4, gen 0
> [4.034828] BTRFS info (device sdg3): bdev /dev/sdf3 errs: wr
I'm getting messages like this when mounting:
[4.034300] BTRFS info (device sdg3): bdev /dev/sdg3 errs: wr 0, rd
0, flush 0, corrupt 4, gen 0
[4.034828] BTRFS info (device sdg3): bdev /dev/sdf3 errs: wr 0, rd
0, flush 0, corrupt 68, gen 0
But it mounts fine, and scrub says it is fine:
$
On 2017年08月18日 11:49, Qu Wenruo wrote:
On 2017年08月18日 11:13, Zirconium Hacker wrote:
I hope "Reply All" is the right option here. Again, first time
interacting with a mailing list. Google said that was what to do.
You're doing quite well, and yes, Reply All is the right option.
I
We have started plug in btrfs_write_and_wait_marked_extents() but the
generated IOs actually go to device's schedule IO list where the work
is doing in another task, thus the started plug doesn't make any
sense.
And since we wait for IOs immediately after writing meta blocks, it's
the same case
Since both committing transaction and writing log-tree are doing
plugging on metadata IO, we can unify to use %sync_writers to benefit
both cases, instead of checking bio_flags while writing meta blocks of
log-tree.
This removes the bio_flags related stuff for writing log-tree.
Signed-off-by:
On Mon, Aug 21, 2017 at 03:23:30PM -0400, Josef Bacik wrote:
> On Mon, Aug 21, 2017 at 12:14:16PM -0700, Liu Bo wrote:
> > On Mon, Aug 21, 2017 at 01:48:01PM -0400, Josef Bacik wrote:
> > > On Fri, Aug 18, 2017 at 11:42:07AM -0600, Liu Bo wrote:
> > > > We have started plug in
On Mon, Aug 21, 2017 at 12:14:16PM -0700, Liu Bo wrote:
> On Mon, Aug 21, 2017 at 01:48:01PM -0400, Josef Bacik wrote:
> > On Fri, Aug 18, 2017 at 11:42:07AM -0600, Liu Bo wrote:
> > > We have started plug in btrfs_write_and_wait_marked_extents() but the
> > > generated IOs actually go to device's
On Mon, Aug 21, 2017 at 01:48:01PM -0400, Josef Bacik wrote:
> On Fri, Aug 18, 2017 at 11:42:07AM -0600, Liu Bo wrote:
> > We have started plug in btrfs_write_and_wait_marked_extents() but the
> > generated IOs actually go to device's schedule IO list where the work
> > is doing in another task,
On Mon, Aug 21, 2017 at 05:42:27PM +0200, David Sterba wrote:
> The superblock is also metadata of the filesystem so the relevant IO
> should be tagged as such. We also tag it as high priority, as it's the
> last block committed for metadata from a given transaction. Any delays
> would effectively
On Mon, Aug 21, 2017 at 11:31:34AM +0800, Qu Wenruo wrote:
>
>
> On 2017年08月21日 11:27, Christoph Anton Mitterer wrote:
> > On Mon, 2017-08-21 at 10:43 +0800, Qu Wenruo wrote:
> > > Harmless, it is only designed to merge fiemap output.
> > Thanks for the info :)
> >
> >
> > On Mon, 2017-08-21
On Fri, Aug 18, 2017 at 11:42:07AM -0600, Liu Bo wrote:
> We have started plug in btrfs_write_and_wait_marked_extents() but the
> generated IOs actually go to device's schedule IO list where the work
> is doing in another task, thus the started plug doesn't make any
> sense.
>
> And since we wait
On Wed, Jun 28, 2017 at 05:59:24PM +0800, Gu Jinxiang wrote:
> For code maintainability and scalability,
> replace hardcoded constant with a meaningful enum.
>
> Signed-off-by: Gu Jinxiang
Sorry for late reply. Patch applied with some tweaks, the added enum
names are too
On Fri, Aug 18, 2017 at 11:54:02AM -0600, Liu Bo wrote:
> While we submit direct writes, if the inode is flagged with nodatasum,
> there's no benefit to submit asynchronously, because
>
> a) we don't have to calculate checksum across processors,
>
> b) and direct IO has started a plug, but async
On Mon, Aug 21, 2017 at 12:43:40PM +0300, Nikolay Borisov wrote:
> Hello,
>
> Here is a series that I've been sitting on for a while. It removes unused
> parameter in various functions, no functional changes. Patch 09/10 reworks
> some error handling to eliminate an if branch in
On Mon, Aug 21, 2017 at 05:42:27PM +0200, David Sterba wrote:
> The superblock is also metadata of the filesystem so the relevant IO
> should be tagged as such. We also tag it as high priority, as it's the
> last block committed for metadata from a given transaction. Any delays
> would effectively
On Fri, Aug 18, 2017 at 01:32:46AM -0700, Gu Jinxiang wrote:
> Parameter fd is not used in function make_image and
> traverse_directory of mkfs.
> Delete it.
>
> Signed-off-by: Gu Jinxiang
Apparently the parameter has never been used. Applied, thanks.
--
To unsubscribe from
On Fri, Aug 18, 2017 at 01:32:45AM -0700, Gu Jinxiang wrote:
> Add some close(fd) when error occures in mkfs.
> And add close(fd) when end use it.
Can you please rework it so all the in-place exists are gotos to a
common exit block that does the close(fd) cleanup? Thanks.
--
To unsubscribe from
On Fri, Aug 18, 2017 at 06:36:30PM +0900, Qu Wenruo wrote:
> For btrfs inspect-internal dump-tree, if we use "-b" parameter to show
> specified tree block, then we don't really need extra tree roots.
>
> Only chunk root is needed to build up the whole chunk mapping so we can
> read tree blocks.
>
On Mon, Aug 21, 2017 at 03:57:04PM +0900, Qu Wenruo wrote:
> Code block of kernel backtrace lacks leading change line, causing the
> following man page result:
> --
>One can determine whether zero-log is needed according to the
>kernel backtrace:
>
>?
On Tue, Aug 01, 2017 at 06:25:56PM +0300, Nikolay Borisov wrote:
> Commit 38851cc19adb ("Btrfs: implement unlocked dio write") implemented
> unlocked dio write, allowing multiple dio writers to write to non-overlapping,
> and non-eof-extending regions. In doing so it also introduced a broken
On Mon, Aug 21, 2017 at 10:31 AM, Robert LeBlanc wrote:
> Qu,
>
> Sorry, I'm not on the list (I was for a few years about three years ago).
>
> I looked at the backup roots like you mentioned.
>
> # ./btrfs inspect dump-super -f /dev/bcache0
> superblock: bytenr=65536,
Qu,
Sorry, I'm not on the list (I was for a few years about three years ago).
I looked at the backup roots like you mentioned.
# ./btrfs inspect dump-super -f /dev/bcache0
superblock: bytenr=65536, device=/dev/bcache0
-
csum_type
On Fri, Aug 18, 2017 at 05:58:22PM +0300, Nikolay Borisov wrote:
> THe function is always called with chunk_objectid set to
> BTRFS_FIRST_CHUNK_TREE_OBJECTID. Let's collapse the parameter in the function
> itself. No functional changes
>
> Signed-off-by: Nikolay Borisov
On Fri, Aug 18, 2017 at 05:58:23PM +0300, Nikolay Borisov wrote:
> Currently this function is always called with the object id of the root key of
> the chunk_tree, which is always BTRFS_CHUNK_TREE_OBJECTID. So let's subsume it
> straight into the function itself. No functional change.
>
>
On Fri, Aug 18, 2017 at 11:58:04AM -0600, Liu Bo wrote:
> Now that we can get inode from dip->inode, it's not necessary to pass
> skip_sum from callers.
Already there, https://patchwork.kernel.org/patch/9879029/
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body
On Thu, Aug 17, 2017 at 10:25:11AM -0400, Jeff Mahoney wrote:
> btrfs_del_roots always uses the tree_root. Let's pass fs_info instead.
>
> Signed-off-by: Jeff Mahoney
Reviewed-by: David Sterba
--
To unsubscribe from this list: send the line "unsubscribe
The superblock is also metadata of the filesystem so the relevant IO
should be tagged as such. We also tag it as high priority, as it's the
last block committed for metadata from a given transaction. Any delays
would effectively block the whole transaction, also blocking any other
operation
On Fri, Aug 18, 2017 at 03:15:17PM -0600, Liu Bo wrote:
> An invalid extent inline ref type could be read from a btrfs image and
> it ends up with a panic[1], this set is to deal with the insane value
> gracefully in patch 1-2 and clean up BUG() in the code in patch 3-6.
>
> Patch 7 adds one more
On Fri, Aug 18, 2017 at 03:15:24PM -0600, Liu Bo wrote:
> Every shared ref has a parent tree block, which can be get from
> btrfs_extent_inline_ref_offset(). And the tree block must be aligned
> to the nodesize, so we'd know this inline ref is not valid if this
> block's bytenr is not aligned to
On Fri, Aug 18, 2017 at 03:15:23PM -0600, Liu Bo wrote:
> The BUG_ON() can be triggered when the caller is processing an invalid
> extent inline ref, e.g.
>
> a shared data ref is offered instead of a extent data ref, such that
> it tries to find a non-exist tree block and then btrfs_search_slot
On Fri, Aug 18, 2017 at 03:15:22PM -0600, Liu Bo wrote:
> Now that we have a helper to report invalid value of extent inline ref
> type, we need to quit gracefully instead of throwing out a kernel panic.
>
> Signed-off-by: Liu Bo
Reviewed-by: David Sterba
On Fri, Aug 18, 2017 at 03:15:21PM -0600, Liu Bo wrote:
> btrfs_print_leaf() is used in btrfs_get_extent_inline_ref_type, so
> here we really want to print the invalid value of ref type instead of
> causing a kernel panic.
>
> Signed-off-by: Liu Bo
> ---
>
On Fri, Aug 18, 2017 at 03:15:20PM -0600, Liu Bo wrote:
> Now that btrfs_get_extent_inline_ref_type() can report if type is a
> valid one and all callers can gracefully deal with that, we don't need
> to crash here.
>
> Signed-off-by: Liu Bo
Reviewed-by: David Sterba
On Fri, Aug 18, 2017 at 03:15:19PM -0600, Liu Bo wrote:
> Since we have a helper which can do sanity check, this converts all
> btrfs_extent_inline_ref_type to it.
>
> Signed-off-by: Liu Bo
Reviewed-by: David Sterba
--
To unsubscribe from this list: send
On Fri, Aug 18, 2017 at 03:15:18PM -0600, Liu Bo wrote:
> An invalid value of extent inline ref type may be read from a
> malicious image which may force btrfs to crash.
>
> This adds a helper which does sanity check for the ref type, so we can
> know if it's sane, return type if so, otherwise
Sorry Markus, but main problem with your patches described at that page:
https://btrfs.wiki.kernel.org/index.php/Developer%27s_FAQ#How_not_to_start
I.e. it's cool that you try to help as you can, but not that way, thanks.
2017-08-21 16:27 GMT+03:00 SF Markus Elfring
From: Josef Bacik
The way we handle delalloc metadata reservations has gotten
progressively more complicated over the years. There is so much cruft
and weirdness around keeping the reserved count and outstanding counters
consistent and handling the error cases that it's
Ignore this, I git format-patch'ed the wrong patch.
Josef
--
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
From: Markus Elfring
Date: Mon, 21 Aug 2017 15:45:23 +0200
Add a jump target so that a bit of exception handling can be better reused
at the end of this function.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring
From: Josef Bacik
Right now we do a lot of weird hoops around outstanding_extents in order
to keep the extent count consistent. This is because we logically
transfer the outstanding_extent count from the initial reservation
through the set_delalloc_bits. This makes it pretty
On Mon, Aug 21, 2017 at 09:08:04AM -0400, Jeff Mahoney wrote:
> On 8/21/17 8:41 AM, SF Markus Elfring wrote:
> > From: Markus Elfring
> > Date: Mon, 21 Aug 2017 13:34:29 +0200
> >
> > Add a jump target so that a bit of exception handling can be better reused
> > in
> Don't needed, and you did miss several similar places (L573 & L895) in
> that file with explicit initialisation.
Would you like to adjust any remaining places in such source files?
Regards,
Markus
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a
On Mon, Aug 21, 2017 at 03:48:51PM +0300, Nikolay Borisov wrote:
>
>
> On 18.08.2017 00:23, jo...@toxicpanda.com wrote:
> > From: Josef Bacik
> >
> > The way we handle delalloc metadata reservations has gotten
> > progressively more complicated over the years. There is so much
> That's will work,
Thanks for your acknowledgement.
> but that's don't improve anything.
Do you like a small source code reduction here?
Regards,
Markus
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More
On Mon, Aug 21, 2017 at 02:35:56PM +0200, SF Markus Elfring wrote:
> From: Markus Elfring
> Date: Mon, 21 Aug 2017 14:30:12 +0200
>
> A few update suggestions were taken into account
> from static source code analysis.
All patches make a nice gallery of
On Mon, Aug 21, 2017 at 09:07:47AM -0400, Jeff Mahoney wrote:
> On 8/21/17 8:38 AM, SF Markus Elfring wrote:
> > From: Markus Elfring
> > Date: Mon, 21 Aug 2017 10:03:00 +0200
> >
> > Add a jump target so that a bit of exception handling can be better reused
> > at
On 8/21/17 8:40 AM, SF Markus Elfring wrote:
> From: Markus Elfring
> Date: Mon, 21 Aug 2017 13:10:15 +0200
>
> Add a jump target so that a bit of exception handling can be better reused
> at the end of this function.
>
> This issue was detected by using the
On 8/21/17 8:41 AM, SF Markus Elfring wrote:
> From: Markus Elfring
> Date: Mon, 21 Aug 2017 13:34:29 +0200
>
> Add a jump target so that a bit of exception handling can be better reused
> in this function.
>
> This issue was detected by using the Coccinelle
On 8/21/17 8:38 AM, SF Markus Elfring wrote:
> From: Markus Elfring
> Date: Mon, 21 Aug 2017 10:03:00 +0200
>
> Add a jump target so that a bit of exception handling can be better reused
> at the end of this function.
>
> This issue was detected by using the
On 8/21/17 8:42 AM, SF Markus Elfring wrote:
> From: Markus Elfring
> Date: Mon, 21 Aug 2017 14:15:23 +0200
>
> Add jump targets so that a bit of exception handling can be better reused
> at the end of this function.
>
> This issue was detected by using the
Reviewed-by: Timofey Titovets
2017-08-21 12:43 GMT+03:00 Nikolay Borisov :
> Src was initially part of 31ff1cd25d37 ("Btrfs: Copy into the log tree in
> big batches"), however 16e7549f045d ("Btrfs: incompatible format change to
> remove hole extents")
Reviewed-by: Timofey Titovets
2017-08-21 12:43 GMT+03:00 Nikolay Borisov :
> THe function is always called with chunk_objectid set to
> BTRFS_FIRST_CHUNK_TREE_OBJECTID. Let's collapse the parameter in the function
> itself. No functional changes
>
>
On 18.08.2017 00:23, jo...@toxicpanda.com wrote:
> From: Josef Bacik
>
> The way we handle delalloc metadata reservations has gotten
> progressively more complicated over the years. There is so much cruft
> and weirdness around keeping the reserved count and outstanding
From: Markus Elfring
Date: Mon, 21 Aug 2017 14:15:23 +0200
Add jump targets so that a bit of exception handling can be better reused
at the end of this function.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring
From: Markus Elfring
Date: Mon, 21 Aug 2017 13:34:29 +0200
Add a jump target so that a bit of exception handling can be better reused
in this function.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring
From: Markus Elfring
Date: Mon, 21 Aug 2017 13:10:15 +0200
Add a jump target so that a bit of exception handling can be better reused
at the end of this function.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring
From: Markus Elfring
Date: Mon, 21 Aug 2017 10:03:00 +0200
Add a jump target so that a bit of exception handling can be better reused
at the end of this function.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring
From: Markus Elfring
Date: Mon, 21 Aug 2017 09:36:48 +0200
Add a jump target so that a bit of exception handling can be better reused
in this function.
Signed-off-by: Markus Elfring
---
fs/btrfs/ctree.c | 14 ++
1 file
From: Markus Elfring
Date: Mon, 21 Aug 2017 14:30:12 +0200
A few update suggestions were taken into account
from static source code analysis.
Markus Elfring (5):
Use common error handling code in tree_mod_log_eb_copy()
Use common error handling code in
Reviewed-by: Timofey Titovets
2017-08-21 12:43 GMT+03:00 Nikolay Borisov :
> Introduced by 5a5f79b57069 ("Btrfs: allow unaligned DIO") and never used,
>
> Signed-off-by: Nikolay Borisov
> ---
> fs/btrfs/inode.c | 3 +--
> 1 file
I lost enough Btrfs m=d=s=RAID5 filesystems in past experiments (I
didn't try using RAID5 for metadata and system chunks in the last few
years) to faulty SATA cables + hotplug enabled SATA controllers (where
a disk could disappear and reappear "as the wind blew"). Since then, I
made a habit of
Don't needed, and you did miss several similar places (L573 & L895) in
that file with explicit initialisation.
Reviewed-by: Timofey Titovets
2017-08-20 23:20 GMT+03:00 SF Markus Elfring :
> From: Markus Elfring
That's will work, but that's don't improve anything.
Reviewed-by: Timofey Titovets
2017-08-20 23:18 GMT+03:00 SF Markus Elfring :
> From: Markus Elfring
> Date: Sun, 20 Aug 2017 21:36:31 +0200
> MIME-Version:
Src was initially part of 31ff1cd25d37 ("Btrfs: Copy into the log tree in
big batches"), however 16e7549f045d ("Btrfs: incompatible format change to
remove hole extents") changed parameters passed to copy_items which made the
src
variable redundant.
Signed-off-by: Nikolay Borisov
Currently this function is always called with the object id of the root key of
the chunk_tree, which is always BTRFS_CHUNK_TREE_OBJECTID. So let's subsume it
straight into the function itself. No functional change.
Signed-off-by: Nikolay Borisov
---
fs/btrfs/volumes.c | 12
THe function is always called with chunk_objectid set to
BTRFS_FIRST_CHUNK_TREE_OBJECTID. Let's collapse the parameter in the function
itself. No functional changes
Signed-off-by: Nikolay Borisov
---
fs/btrfs/volumes.c | 8
1 file changed, 4 insertions(+), 4
Introduced by 5a5f79b57069 ("Btrfs: allow unaligned DIO") and never used,
Signed-off-by: Nikolay Borisov
---
fs/btrfs/inode.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 61f1ad89e97a..f1b3d6146924 100644
---
__link_block_group is called from only 2 places and at each call site the
space_info being passed is the same as the space info assigned to the passed
cache struct. Let's remove the redundant argument and make the function
reference the space_info from the passed block_group_cache. No functional
Currently the code executes add_extent_mapping and if it is successful it links
the new mapping, it then proceeds to unlock the extent mapping tree and check
for failure and handle them. Instead, rework the code to only perform a single
check if add_extent_mapping has failed and handle it,
The delalloc_end parameter was only passed to extent_clear_unlock_delalloc, but
since its usage was removed form that function let's also remove it from the
caller's parameter list.
Signed-off-by: Nikolay Borisov
---
fs/btrfs/inode.c | 20 +---
1 file changed,
btrfs_changed_cb_t represents the signature of the callback being passed to
btrfs_compare_trees. Currently there is only one such callback, namely
changed_cb in send.c. This function doesn't really uses the first 2 parameters,
i.e. the roots. Since there are not other functions implementing the
iterate_dir_item:found_key - introduced in 31db9f7c23fb ("Btrfs: introduce
BTRFS_IOC_SEND for btrfs send/receive"), yet never used.
record_ref:num - ditto
This is a first pass with the low-hanging fruit. There are still quite a few
unsued parameters in some function which have to abide by a
This variable was added as part of ba8b04c1d4ad ("btrfs: extend
btrfs_set_extent_delalloc and its friends to support in-band dedupe and subpage
size patchset")
however those patchsets haven't materialized yet. Let's remove the argument and
when the time comes (e.g. whiever patchset lands first)
Hello,
Here is a series that I've been sitting on for a while. It removes unused
parameter in various functions, no functional changes. Patch 09/10 reworks
some error handling to eliminate an if branch in __btrfs_alloc_chunk, but it's
still a minor refactoring.
Nikolay Borisov (10):
btrfs:
You use that doc [1], so it's okay, because that's style are more safe.
But i don't think that at now such cleanups are really usefull at now.
Because that's not improve anything.
Reviewed-by: Timofey Titovets
[1] -
From: Zhang Yu
[TEST/fuzz] case: 004-simple-dump-tree
Since the wrong key(DATA_RELOC_TREE CHUNK_ITEM 0) in root tree,
error calling print_chunk(), resulting in num_stripes == 0.
ERROR:
[TEST/fuzz] 004-simple-dump-tree
ctree.h:317: btrfs_chunk_item_size:
On 2017年08月21日 12:33, Robert LeBlanc wrote:
I've been running btrfs in a raid5 for about a year now with bcache in
front of it. Yesterday, one of my drives was acting really slow, so I
was going to move it to a different port. I guess I get too
comfortable hot plugging drives in at work and
Code block of kernel backtrace lacks leading change line, causing the
following man page result:
--
One can determine whether zero-log is needed according to the
kernel backtrace:
? replay_one_dir_item+0xb5/0xb5 [btrfs]
? walk_log_tree+0x9c/0x19d
81 matches
Mail list logo