This fixes "btrfs inspect-internal dump-super --bytenr"
Signed-off-by: Tomohiro Misono
---
cmds-inspect-dump-super.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/cmds-inspect-dump-super.c b/cmds-inspect-dump-super.c
index 98e0270..c7afd80 100644
This fixes "btrfs receive -E"
Signed-off-by: Tomohiro Misono
---
cmds-receive.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cmds-receive.c b/cmds-receive.c
index 72e9c8f..e584cef 100644
--- a/cmds-receive.c
+++ b/cmds-receive.c
@@ -1277,7
I found some btrfs commands options are not working because of
inappropriate getopt_long() setting.
This fixes "btrfs check -Q/-E"
Signed-off-by: Tomohiro Misono
---
cmds-check.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cmds-check.c
Sorry, this patch's encoding is wrong.
Please ignore this and I will resend the patch.
On 2017/08/24 13:03, Misono, Tomohiro wrote:
I found some btrfs commands options are not working because of
inappropriate getopt_long() setting.
This fixes "btrfs check -Q/-E"
Signed-off-by: Tomohiro
I found some btrfs commands options are not working because of
inappropriate getopt_long() setting.
This fixes "btrfs check -Q/-E"
Signed-off-by: Tomohiro Misono
---
cmds-check.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cmds-check.c
On 2017/08/23 23:52, shally verma wrote:
> HI
>
> Through btrfs wiki, I got to know about inline patch and this git
> location https://github.com/adam900710/linux but I am not sure what's
> progress and status on this. Could any one please confirm what is the
> status of inline deduplication
Walk over data sample and use memcmp to detect
repeated data (like zeroed)
Signed-off-by: Timofey Titovets
---
fs/btrfs/heuristic.c | 16
1 file changed, 16 insertions(+)
diff --git a/fs/btrfs/heuristic.c b/fs/btrfs/heuristic.c
index
Move heuristic to external file
Implement compression workspaces support for
heuristic resources
Signed-off-by: Timofey Titovets
---
fs/btrfs/heuristic.c | 10 --
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/fs/btrfs/heuristic.c
Heuristic workspace:
- Add bucket for storing byte type counters
- Add sample array for storing partial copy of
input data range
- Add counter for store current sample size to workspace
Signed-off-by: Timofey Titovets
---
fs/btrfs/heuristic.c | 23
Copy sample data from input data range to sample buffer
then calculate byte type count for that sample into bucket.
Signed-off-by: Timofey Titovets
---
fs/btrfs/heuristic.c | 38 +-
1 file changed, 37 insertions(+), 1 deletion(-)
diff
Calculate byte core set for data sample:
Sort bucket's numbers in decreasing order
Count how many numbers use 90% of sample
If core set are low (<=25%), data are easily compressible
If core set high (>=80%), data are not compressible
Signed-off-by: Timofey Titovets
---
Based on kdave for-next
Patches short:
1. Move heuristic to use compression workspaces
Bit tricky, but works.
2. Add heuristic counters and buffer to workspaces
3. Implement simple input data sampling
It's get 16 byte samples with 256 bytes shifts
over input data. Collect info about
Calculate byte set size for data sample:
Calculate how many unique bytes has been in sample
By count all bytes in bucket with count > 0
If byte set low (~25%), data are easily compressible
Signed-off-by: Timofey Titovets
---
fs/btrfs/heuristic.c | 26
On 8/15/14 5:29 AM, Al Viro wrote:
> On Thu, Aug 14, 2014 at 07:58:56PM -0700, Luis R. Rodriguez wrote:
>
>> Christoph had noted that this seemed associated to the problem
>> that the btrfs uses different assignments for st_dev than s_dev,
>> but much as I'd like to see that changed based on
On Wed 2017-08-23 (12:42), Peter Grandi wrote:
> > So, still: What is the problem with user_subvol_rm_allowed?
>
> As usual, it is complicated: mostly that while subvol creation
> is very cheap, subvol deletion can be very expensive. But then
> so can be creating many snapshots, as in this:
But
Op Wed, 23 Aug 2017 10:37:07 +0200, schreef A L:
> From: Ulli Horlacher -- Sent:
> 2017-08-23 - 09:18
>
>> On Tue 2017-08-22 (22:48), Ulli Horlacher wrote:
>>
>>> > Assumptions that all Btrfs features such as snapshots are infinitely
>>> > scalable at
2017-08-23 20:55 GMT+03:00 Diego Calleja :
> El miércoles, 23 de agosto de 2017 2:26:48 (CEST) Timofey Titovets escribió:
>> + for (i = 0; i < workspace->sample_size; i += sizeof(zero)) {
>> + if (memcmp(>sample[i], , sizeof(zero)))
>> +
On Wed, Aug 23, 2017 at 10:13:40AM -0600, Liu Bo wrote:
> On Tue, Aug 22, 2017 at 11:45:59PM -0700, Omar Sandoval wrote:
> > From: Omar Sandoval
> >
> > This fixes several instances of blk_status_t and bare errno ints being
> > mixed up, some of which are real bugs.
> >
> >
flush_epd_write_bio() sets bio->bi_ops by itself to honor REQ_SYNC,
but it's not needed at all since bio->bi_ops has set up properly in
both __extent_writepage() and write_one_eb(), and in the case of
write_one_eb(), it also sets REQ_META, which we will lose in
flush_epd_write_bio().
This remove
On 08/23/2017 11:10 AM, Christoph Hellwig wrote:
> Hi Jens,
>
> this series removes the need to have a struct block_device ready to
> submit a bio. We basically don't use it anywhere in the block stack
> anyway - we always go for the gendisk or request_queue. The only
> exception is partition
On Wed, Aug 23, 2017 at 07:10:27PM +0200, Christoph Hellwig wrote:
> We won't have the struct block_device available in the bio soon, so switch
> to the numerical dev_t instead of the block_device pointer for looking up
> the check-integrity state.
Reviewed-by: Liu Bo
On Wed, Aug 23, 2017 at 07:10:28PM +0200, Christoph Hellwig wrote:
> The block layer always remaps partitions before calling into the
> ->make_request methods of drivers. Thus the call to get_start_sect in
> in_chunk_boundary will always return 0 and can be removed.
>
> Signed-off-by: Christoph
On 08/23/2017 11:10 AM, Christoph Hellwig wrote:
> Hi Jens,
>
> this series removes the need to have a struct block_device ready to
> submit a bio. We basically don't use it anywhere in the block stack
> anyway - we always go for the gendisk or request_queue. The only
> exception is partition
Patch 6 didn't seem to make it through to the list, so here is a
link to the git tree:
http://git.infradead.org/users/hch/block.git/shortlog/refs/heads/bi_bdev
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More
El miércoles, 23 de agosto de 2017 2:26:48 (CEST) Timofey Titovets escribió:
> + for (i = 0; i < workspace->sample_size; i += sizeof(zero)) {
> + if (memcmp(>sample[i], , sizeof(zero)))
> + return false;
Instead of just checking for 0, wouldn't it be a better
At now while compressing data range code touch dirty
page status on whole range on each 128kb iteration, that's costs time
As we care only about page status in range that will be compressed
in current iteration, let's touch dirty status only for actual
compression range
Signed-off-by: Timofey
On Tue, Aug 22, 2017 at 11:45:59PM -0700, Omar Sandoval wrote:
> From: Omar Sandoval
>
> This fixes several instances of blk_status_t and bare errno ints being
> mixed up, some of which are real bugs.
>
> Fixes: 4e4cbee93d56 ("block: switch bios to blk_status_t")
>
On Fri, Jul 14, 2017 at 03:47:46PM +0800, Su Yue wrote:
> In this test case, all name in dir_item, dir_index, inode_ref
> are corrupted to another one.
> btrfs check should report errors about the corrupted dir_item but
> btrfs can't repair the case now.
>
> Signed-off-by: Su Yue
This helper allows looking up a partion under RCU protection without
grabbing a reference to it.
Signed-off-by: Christoph Hellwig
---
block/blk.h | 2 ++
block/genhd.c | 26 +-
2 files changed, 15 insertions(+), 13 deletions(-)
diff --git a/block/blk.h
The block layer always remaps partitions before calling into the
->make_request methods of drivers. Thus the call to get_start_sect in
in_chunk_boundary will always return 0 and can be removed.
Signed-off-by: Christoph Hellwig
---
drivers/md/raid5.c | 4 +++-
1 file changed, 3
Signed-off-by: Christoph Hellwig
---
fs/block_dev.c | 1 +
include/linux/fs.h | 1 +
2 files changed, 2 insertions(+)
diff --git a/fs/block_dev.c b/fs/block_dev.c
index 9941dc8342df..d29d1c70f833 100644
--- a/fs/block_dev.c
+++ b/fs/block_dev.c
@@ -1451,6 +1451,7 @@ static int
Hi Jens,
this series removes the need to have a struct block_device ready to
submit a bio. We basically don't use it anywhere in the block stack
anyway - we always go for the gendisk or request_queue. The only
exception is partition remapping for which we'll now need an additional
partition
We won't have the struct block_device available in the bio soon, so switch
to the numerical dev_t instead of the block_device pointer for looking up
the check-integrity state.
Signed-off-by: Christoph Hellwig
---
fs/btrfs/check-integrity.c | 31 +--
1
Signed-off-by: Christoph Hellwig
---
block/genhd.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/block/genhd.c b/block/genhd.c
index 2367087cdb7c..3380a1e73ea0 100644
--- a/block/genhd.c
+++ b/block/genhd.c
@@ -1357,6 +1357,13 @@ struct gendisk *alloc_disk_node(int
On Tue, Aug 22, 2017 at 11:45:59PM -0700, Omar Sandoval wrote:
> From: Omar Sandoval
>
> This fixes several instances of blk_status_t and bare errno ints being
> mixed up, some of which are real bugs.
Reviewed-by: David Sterba
The real bugs are lurking in the
On 2017-08-23 11:28, Chris Murphy wrote:
On Wed, Aug 2, 2017 at 2:27 PM, Liu Bo wrote:
On Wed, Aug 02, 2017 at 10:41:30PM +0200, Goffredo Baroncelli wrote:
What I want to understand, is if it is possible to log only the "partial
stripe" RMW cycle.
I think your
On Wed, Aug 2, 2017 at 2:27 PM, Liu Bo wrote:
> On Wed, Aug 02, 2017 at 10:41:30PM +0200, Goffredo Baroncelli wrote:
>> What I want to understand, is if it is possible to log only the "partial
>> stripe" RMW cycle.
>>
>
> I think your point is valid if all data is written
On 23.08.2017 10:57, Qu Wenruo wrote:
> The patchset introduce a new framework to do more comprehensive (if not
> the most) sanity check when reading out a leaf.
>
> The new sanity checker will include:
>
> 1) Key order
>Existing code
>
> 2) Item boundary
>Existing code with enhanced
HI
Through btrfs wiki, I got to know about inline patch and this git
location https://github.com/adam900710/linux but I am not sure what's
progress and status on this. Could any one please confirm what is the
status of inline deduplication into btrfs and if it is the correct
location to see its
On 2017-08-23 14:07, Austin S. Hemmelgarn wrote:
> On 2017-08-22 13:41, Peter Grandi wrote:
> [ ... ]
>> This stupid point relies on ignoring that it is not mandatory to
>> mount the main volume, and that therefore "There is no fixed
>> relationship between the root directory inode of a subvolume
> -Ursprüngliche Nachricht-
> Von: Dmitrii Tcvetkov
> Gesendet: Di. 22.08.2017 12:28
> An: g6094...@freenet.de
> Kopie: linux-btrfs@vger.kernel.org
> Betreff: Re: degraded BTRFS RAID 1 not mountable: open_ctree failed, unable
> to find block group for 0
>
> On Tue, 22 Aug 2017 11:31:23
> This is a vanilla SLES12 installation: [ ... ] Why does SUSE
> ignore this "not too many subvolumes" warning?
As in many cases with Btrfs "it's complicated" because of the
interaction of advanced features among themselves and the chosen
implementation and properties of storage; anisotropy
> So, still: What is the problem with user_subvol_rm_allowed?
As usual, it is complicated: mostly that while subvol creation
is very cheap, subvol deletion can be very expensive. But then
so can be creating many snapshots, as in this:
https://www.spinics.net/lists/linux-btrfs/msg62760.html
On 2017-08-22 13:41, Peter Grandi wrote:
[ ... ]
There is no fixed relationship between the root directory
inode of a subvolume and the root directory inode of any
other subvolume or the main volume.
Actually, there is, because it's inherently rooted in the
hierarchy of the volume itself.
From: Ulli Horlacher -- Sent: 2017-08-23 -
09:18
> On Tue 2017-08-22 (22:48), Ulli Horlacher wrote:
>
>> > Assumptions that all Btrfs features such as snapshots are
>> > infinitely scalable at no cost may be optimistic:
>> >
>> >
>> >
Current check_leaf() function does a good job checking key orders and
item offset/size.
However it only checks from slot 0 to the last but one slot, this is
good but makes later expansion hard.
So this refactoring iterates from slot 0 to the last slot.
For key comparison, it uses a key with all
Function check_leaf() checks if any item pointer points outside of the
leaf, but it doesn't check if the pointer overlap with the item itself.
Normally only the last item may be the victim, but adding such check is
never a bad idea anyway.
Signed-off-by: Qu Wenruo
---
The patchset introduce a new framework to do more comprehensive (if not
the most) sanity check when reading out a leaf.
The new sanity checker will include:
1) Key order
Existing code
2) Item boundary
Existing code with enhanced checker to ensure item pointer doesn't
overlap with item
EXTENT_CSUM checker is a relatively easy checker, only needs to check:
1) Objectid
Fixed to BTRFS_EXTENT_CSUM_OBJECTID.
2) Key offset alignment
Must be aligned to sectorsize
3) Item size alignedment
Must be aligned to csum size.
Signed-off-by: Qu Wenruo
---
Add extra checker for item with EXTENT_DATA type.
This checks the following thing:
0) Key offset
All key offset must be aligned to sectorsize.
Inline extent must have 0 for key offset.
1) Item size
Plain text inline file extent size must match item size.
(compressed inline file extent
On Wed 2017-08-23 (10:16), Dmitrii Tcvetkov wrote:
> > >Also in https://btrfs.wiki.kernel.org/index.php/Mount_options
> > >"user_subvol_rm_allowed (...) Use with caution."
> > >
> > >Why? What is the problem?
> >
> > Because with the mount option any user can delete any subvolume,
> > including
On Tue 2017-08-22 (22:48), Ulli Horlacher wrote:
> > Assumptions that all Btrfs features such as snapshots are
> > infinitely scalable at no cost may be optimistic:
> >
> >
> > https://btrfs.wiki.kernel.org/index.php/Gotchas#Having_many_subvolumes_can_be_very_slow
>
> "when you do device
> >Also in https://btrfs.wiki.kernel.org/index.php/Mount_options
> >"user_subvol_rm_allowed (...) Use with caution."
> >
> >Why? What is the problem?
>
> Because with the mount option any user can delete any subvolume,
> including root one (subvol_id=5)
Apologies, it works somewhat different:
From: Omar Sandoval
The rcu_string API introduced some new sparse errors but also revealed
existing ones. First of all, the name in struct btrfs_device should be
annotated as __rcu to prevent unsafe reads. Additionally, updates should
go through rcu_dereference_protected to make
From: Omar Sandoval
fs_info->super_copy->{node,sector}size are little-endian, but the ioctl
should return the values in native endianness. Use the cached values in
btrfs_fs_info instead. Found with sparse.
Fixes: 80a773fbfc2d ("btrfs: retrieve more info from FS_INFO ioctl")
From: Omar Sandoval
Signed-off-by: Omar Sandoval
---
fs/btrfs/ioctl.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index cf71d0304671..7a7a82e0963c 100644
--- a/fs/btrfs/ioctl.c
+++
From: Omar Sandoval
The RCU-friendly string API used internally by Btrfs is generic enough
for common use. This doesn't add any new functionality but instead just
moves the code and documents the existing API.
Reviewed-by: Josh Triplett
Acked-by: Paul E.
From: Omar Sandoval
These aren't used outside of volumes.c.
Signed-off-by: Omar Sandoval
---
fs/btrfs/volumes.c | 14 --
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index
From: Omar Sandoval
A naked read of the value of an RCU pointer isn't safe. Put the whole
access in an RCU critical section, not just the pointer dereference.
Signed-off-by: Omar Sandoval
---
fs/btrfs/ioctl.c | 10 +-
1 file changed, 5 insertions(+), 5
From: Omar Sandoval
I came across my ancient RCU string branch [1] and decided to revive it
and finally put it to rest. In the process of checking it with sparse, I
found a handful of other issues.
Patch 1 should probably go in 4.13, as it fixes bugs introduced this
cycle by the
From: Omar Sandoval
This fixes several instances of blk_status_t and bare errno ints being
mixed up, some of which are real bugs.
Fixes: 4e4cbee93d56 ("block: switch bios to blk_status_t")
Signed-off-by: Omar Sandoval
---
fs/btrfs/disk-io.c | 4 ++--
>Also in https://btrfs.wiki.kernel.org/index.php/Mount_options
>"user_subvol_rm_allowed (...) Use with caution."
>
>Why? What is the problem?
Because with the mount option any user can delete any subvolume, including root
one (subvol_id=5)
--
To unsubscribe from this list: send the line
62 matches
Mail list logo