[BUG]
For btrfs related events, there is a field for fsid, but perf never
parse it correctly.
# perf trace -e btrfS:qgroup_meta_convert xfs_io -f -c "pwrite 0 4k" \
/mnt/btrfs/file1
0.000 xfs_io/77915 btrfs:qgroup_meta_reserve:(nil)U: refroot=5(FS_TREE)
type=0x0 diff=2
On 2019/10/16 上午3:03, DrYak wrote:
> Hello
>
> I'm having trouble on a BTRFS file system that I use on a Raspberry Pi.
> I can still mount and access (nearly all) my data.
>
> The trouble origin itself is probably hardware (flacky USB3-to-mSATA
> adapter and/or power stability), not necessarily
On 2019/10/16 上午1:55, José Luis wrote:
> I also noticed the craziness of the previous dump. I cannot remember
> the kernel running by this date but I use to install the latest stable
> kernel on the Manjaro repositories (I'm an early adopter :P).
> According the Manjaro forum release news they ro
On Tue, Oct 15, 2019 at 09:18:11PM +0200, Sebastian Andrzej Siewior wrote:
> From: Thomas Gleixner
>
> CONFIG_PREEMPTION is selected by CONFIG_PREEMPT and by CONFIG_PREEMPT_RT.
> Both PREEMPT and PREEMPT_RT require the same functionality which today
> depends on CONFIG_PREEMPT.
>
> Switch the bt
On Tue, Oct 15, 2019 at 02:17:55PM +0200, David Sterba wrote:
> On Mon, Oct 07, 2019 at 04:17:34PM -0400, Dennis Zhou wrote:
> > @@ -2165,6 +2173,7 @@ static bool try_merge_free_space(struct
> > btrfs_free_space_ctl *ctl,
> > bool merged = false;
> > u64 offset = info->offset;
> > u64
On Tue, Oct 15, 2019 at 02:49:19PM +0200, David Sterba wrote:
> On Mon, Oct 07, 2019 at 04:17:36PM -0400, Dennis Zhou wrote:
> > --- a/fs/btrfs/block-group.h
> > +++ b/fs/btrfs/block-group.h
> > @@ -115,7 +115,11 @@ struct btrfs_block_group_cache {
> > /* For read-only block groups */
> > s
From: Thomas Gleixner
CONFIG_PREEMPTION is selected by CONFIG_PREEMPT and by CONFIG_PREEMPT_RT.
Both PREEMPT and PREEMPT_RT require the same functionality which today
depends on CONFIG_PREEMPT.
Switch the btrfs_device_set_…() macro over to use CONFIG_PREEMPTION.
Cc: Chris Mason
Cc: Josef Bacik
Hello
I'm having trouble on a BTRFS file system that I use on a Raspberry Pi.
I can still mount and access (nearly all) my data.
The trouble origin itself is probably hardware (flacky USB3-to-mSATA
adapter and/or power stability), not necessarily a bug in BTRFS.
As I've said I can retreive nearl
From: Omar Sandoval
The upcoming RWF_ENCODED operation introduces some security concerns:
1. Compressed writes will pass arbitrary data to decompression
algorithms in the kernel.
2. Compressed reads can leak truncated/hole punched data.
Therefore, we need to require privilege for RWF_ENCODED
From: Omar Sandoval
Hello,
This series adds an API for reading compressed data on a filesystem
without decompressing it as well as support for writing compressed data
directly to the filesystem. It is based on my previous series which
added a Btrfs-specific ioctl [1], but it is now an extension
From: Omar Sandoval
The implementation resembles direct I/O: we have to flush any ordered
extents, invalidate the page cache, and do the io tree/delalloc/extent
map/ordered extent dance. From there, we can reuse the compression code
with a minor modification to distinguish the write from writebac
From: Omar Sandoval
There are 4 main cases:
1. Inline extents: we copy the data straight out of the extent buffer.
2. Hole/preallocated extents: we indicate the size of the extent
starting from the read position; we don't need to copy zeroes.
3. Regular, uncompressed extents: we read the sect
From: Omar Sandoval
This adds a new page, rwf_encoded(7), providing an overview of encoded
I/O and updates fcntl(2), open(2), and preadv2(2)/pwritev2(2) to
reference it.
Signed-off-by: Omar Sandoval
---
man2/fcntl.2 | 10 +-
man2/open.2| 13 ++
man2/readv.2 | 46 +++
From: Omar Sandoval
This isn't actually dio-specific; it just looks up the csums starting at
the given offset instead of using the page index. Rename it to
btrfs_lookup_bio_sums_at_offset() and add the dst parameter. We might
even want to expose __btrfs_lookup_bio_sums() as the public API instead
From: Omar Sandoval
Btrfs supports transparent compression: data written by the user can be
compressed when written to disk and decompressed when read back.
However, we'd like to add an interface to write pre-compressed data
directly to the filesystem, and the matching interface to read
compresse
On Tue, Oct 15, 2019 at 03:12:17PM +0200, David Sterba wrote:
> On Mon, Oct 07, 2019 at 04:17:39PM -0400, Dennis Zhou wrote:
> > The number of discardable extents will serve as the rate limiting metric
> > for how often we should discard. This keeps track of discardable extents
> > in the free spac
On Tue, Oct 15, 2019 at 02:11:02PM +0200, David Sterba wrote:
> On Mon, Oct 07, 2019 at 06:24:19PM -0400, Dennis Zhou wrote:
> > > > + * Bitmap region iterators. Iterates over the bitmap between [@start,
> > > > @end).
> > >
> > > Gonna be that guy here, should be '[@start, @end]'
> >
> > I dis
Hi Btrfs maintainers,
I am reporting a potential data race around the `delayed_rsv->full` field.
[thread 1] mount a btrfs image, a kernel thread of uuid_rescan will be created
btrfs_uuid_rescan_kthread
btrfs_end_transaction
__btrfs_end_transaction
btrfs_trans_release_metadata
On Tue, Sep 24, 2019 at 04:50:43PM -0400, Josef Bacik wrote:
> While testing 5.2 we ran into the following panic
>
> [52238.017028] BUG: kernel NULL pointer dereference, address: 0001
> [52238.105608] RIP: 0010:drop_buffers+0x3d/0x150
> [52238.304051] Call Trace:
> [52238.308958] try_
I also noticed the craziness of the previous dump. I cannot remember
the kernel running by this date but I use to install the latest stable
kernel on the Manjaro repositories (I'm an early adopter :P).
According the Manjaro forum release news they roll up version 4.19 by
these days so probably I wa
This tests ensures that the kernel correctly persists backup roots in
case the filesystem has been mounted from a backup root.
Signed-off-by: Nikolay Borisov
---
.../misc-tests/038-backup-root-corruption/test.sh | 50 ++
1 file changed, 50 insertions(+)
create mode 100755 t
Here are two patches which I cooked up while working on the kernel side of
backup
root retention code. The first one fixes '-m -f generation' options to
btrfs-corrupt-block, allowing me to simulate backup root corruption.
The second patch is a test case which sanity checks the implementation.
As progs' transaction/CoW logic evolved over the years the metadata block
corruption code failed to do so. It's currently impossible to corrupt
the generation because the CoW logic will not only set it to the value
of the currently running transaction (__btrfs_cow_block) but the
current code will A
The code responsible for reading and initilizing tree roots is
scattered in open_ctree among 2 labels, emulating a loop. This is rather
confusing to reason about. Instead, factor the code in a new function,
init_tree_roots which implements the same logical flow.
There are a couple of notable diffe
Since the filesystem is not well formed and no trees are loaded it's
pointless holding the objectid_mutex. Just remove its usage.
---
fs/btrfs/disk-io.c | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index a82e3acca765..418619dfb7
This function is no longer used so just remove it
---
fs/btrfs/disk-io.c | 50 --
1 file changed, 50 deletions(-)
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 418619dfb76c..bcb21a35d30c 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-i
This function will replace next_root_backup with a much saner/cleaner
interface.
---
fs/btrfs/disk-io.c | 44
1 file changed, 44 insertions(+)
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index d51f76abde45..9ed3b40aa10d 100644
--- a/fs/btrfs/d
The backup_root_index member stores the index at which the backup root
should be saved upon next transaction commit. However, there is a
small deviation from this behavior in the form of a check in
backup_super_roots which checks if current root generation equals to the
generation of the previous
The old name name was an awful misnomer because it didn't really find
the oldest super backup per se but rather its slot. For example if we
have:
slot0: gen - 2
slot1: gen - 1
slot2: gen
slot3: empty
init_backup_root_slot will return slot3 and not slot0.
The new name is more appropriate since th
Hello,
Here is the second version of the tree reading code which gets executed during
mount. This goes a bit further than the previous posting in that it not only
introduces a new function but also refactors the code which decides which backup
root to use. Overall I think the semantics are now
It's no longer needed following cleanups around find_newest_backup_root
---
fs/btrfs/disk-io.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 8b1f6385023d..d51f76abde45 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
Backup roots are always written in a circular manner. By definition we
can only ever have 1 backup root whose generation equals to that of the
superblock. Hence, the 'if' in the for loop will trigger at most once.
This is sufficient to return the newest backup root.
Furthermore thew newest_gen par
On Tue, Oct 15, 2019 at 01:38:25AM +0200, David Sterba wrote:
> On Mon, Oct 14, 2019 at 04:17:46PM -0400, Dennis Zhou wrote:
> > On Thu, Oct 10, 2019 at 01:11:38PM -0400, Josef Bacik wrote:
> > > On Mon, Oct 07, 2019 at 04:17:46PM -0400, Dennis Zhou wrote:
> > > > Async discard doesn't remember the
On Tue, Oct 15, 2019 at 02:08:31PM +0200, David Sterba wrote:
> Hi,
>
> thanks for working on this. The plain -odiscard hasn't been recommended
> to users for a long time, even with the SATA 3.1 drives that allow
> queueing the requests.
>
> The overall approach to async discard sounds good, the
On Mon, Oct 14, 2019 at 02:34:51PM +0800, Qu Wenruo wrote:
> [Background]
> Btrfs qgroup uses two types of reserved space for METADATA space,
> PERTRANS and PREALLOC.
>
> PERTRANS is metadata space reserved for each transaction started by
> btrfs_start_transaction().
> While PREALLOC is for delall
On 2019/10/15 下午11:03, José Luis wrote:
> Thanks for fast response Qu.
>
> I booted into a pendrive live system for the test cause I'm using the
> involving fylesystem with kernel 4.19. This time when I mount
>> [manjaro@manjaro ~]$ sudo mount /dev/sdb2 /mnt
>> mount: /mnt: no se puede leer el s
On Mon, Oct 07, 2019 at 04:17:39PM -0400, Dennis Zhou wrote:
> The number of discardable extents will serve as the rate limiting metric
> for how often we should discard. This keeps track of discardable extents
> in the free space caches by maintaining deltas and propagating them to
> the global co
Thanks for fast response Qu.
I booted into a pendrive live system for the test cause I'm using the
involving fylesystem with kernel 4.19. This time when I mount
>[manjaro@manjaro ~]$ sudo mount /dev/sdb2 /mnt
>mount: /mnt: no se puede leer el superbloque en /dev/sdb2.
and in the dmesg:
[ +30,86647
On Mon, Oct 07, 2019 at 04:17:36PM -0400, Dennis Zhou wrote:
> --- a/fs/btrfs/block-group.h
> +++ b/fs/btrfs/block-group.h
> @@ -115,7 +115,11 @@ struct btrfs_block_group_cache {
> /* For read-only block groups */
> struct list_head ro_list;
>
> + /* For discard operations */
>
On 2019/10/15 下午8:24, Qu Wenruo wrote:
>
>
> On 2019/10/15 下午6:15, José Luis wrote:
>> Dear devs,
>>
>> I cannot use kernel >= 5.2, They cannot mount sdb2 nor sb3 both btrfs
>> filesystems. I can work as intended on 4.19 which is an LTS version,
>> previously using 5.1 but Manjaro removed it fr
On 2019/10/15 下午6:15, José Luis wrote:
> Dear devs,
>
> I cannot use kernel >= 5.2, They cannot mount sdb2 nor sb3 both btrfs
> filesystems. I can work as intended on 4.19 which is an LTS version,
> previously using 5.1 but Manjaro removed it from their repositories.
>
> More info:
> · dmesg:
>
On Mon, Oct 07, 2019 at 04:17:35PM -0400, Dennis Zhou wrote:
> --- a/fs/btrfs/free-space-cache.h
> +++ b/fs/btrfs/free-space-cache.h
> @@ -7,6 +7,7 @@
> #define BTRFS_FREE_SPACE_CACHE_H
>
> #define BTRFS_FSC_TRIMMED(1UL << 0)
> +#define BTRFS_FSC_TRIMMING_BITMAP(1UL << 1)
>
>
On Mon, Oct 07, 2019 at 04:17:34PM -0400, Dennis Zhou wrote:
> @@ -2165,6 +2173,7 @@ static bool try_merge_free_space(struct
> btrfs_free_space_ctl *ctl,
> bool merged = false;
> u64 offset = info->offset;
> u64 bytes = info->bytes;
> + bool is_trimmed = btrfs_free_space_trim
As btrfs_parse_device_options() now doesn't only parse the -o device mount
option but -o auth_key as well, it makes sense to rename it back to
btrfs_parse_early_options().
This reverts commit fa59f27c8c35bbe00af8eff23de446a7f4b048b0.
Signed-off-by: Johannes Thumshirn
---
fs/btrfs/super.c | 11 +
Add authentication support for a BTRFS file-system.
This works, because in BTRFS every meta-data block as well as every
data-block has a own checksum. For meta-data the checksum is in the
meta-data node itself. For data blocks, the checksums are stored in the
checksum tree.
When replacing the che
On Mon, Oct 07, 2019 at 06:24:19PM -0400, Dennis Zhou wrote:
> > > + * Bitmap region iterators. Iterates over the bitmap between [@start,
> > > @end).
> >
> > Gonna be that guy here, should be '[@start, @end]'
>
> I disagree here. I'm pretty happy with [@start, @end). If btrfs wants to
> carry
Hi,
thanks for working on this. The plain -odiscard hasn't been recommended
to users for a long time, even with the SATA 3.1 drives that allow
queueing the requests.
The overall approach to async discard sounds good, the hard part is not
shoot down the filesystem by trimming live data, and we had
Dear devs,
I cannot use kernel >= 5.2, They cannot mount sdb2 nor sb3 both btrfs
filesystems. I can work as intended on 4.19 which is an LTS version,
previously using 5.1 but Manjaro removed it from their repositories.
More info:
· dmesg:
> [oct15 13:47] BTRFS info (device sdb2): disk space cachi
On Mon, Oct 14, 2019 at 7:36 AM Qu Wenruo wrote:
>
> [Background]
> Btrfs qgroup uses two types of reserved space for METADATA space,
> PERTRANS and PREALLOC.
>
> PERTRANS is metadata space reserved for each transaction started by
> btrfs_start_transaction().
> While PREALLOC is for delalloc, wher
From: Filipe Manana
If we fail to reserve metadata for delalloc operations we end up releasing
the previously reserved qgroup amount twice, once explicitly under the
'out_qgroup' label by calling btrfs_qgroup_free_meta_prealloc() and once
again, under label 'out_fail', by calling btrfs_inode_rsv_
50 matches
Mail list logo