[PROBLEM]
There are some reports of corrupted fs which can't be mounted due to
corrupted extent tree.
However under such situation, it's more likely the fs/subvolume trees
are still fine.
For such case we normally go btrfs-restore and salvage as much as we
can. However btrfs-restore can't list su
This patch introduces a new "rescue=" mount option group for all those
mount options for data recovery.
Different rescue sub options are seperated by ':'. E.g
"ro,rescue=nologreplay:usebackuproot".
(The original plan is to use ';', but ';' needs to be escaped/quoted,
or it will be interpreted by b
There are quite a lot btrfs extent tree corruption report in the mail
list.
Since btrfs will do mount time block group item search, one corrupted
leaf containing block group item will prevent the whole fs to be
mounted.
This patchset will try to address the problem by introducing a new mount
optio
On Thu, Sep 05, 2019 at 03:42:10PM -0500, Goldwyn Rodrigues wrote:
> > Thіs looks really strange. Can you explain me why you need the
> > manual dirtying and SetPageUptodate, and an additional page refcount
> > here?
>
> It was a part btrfs code which is carried forward. Yes, we don't need
> the
It's common to copy/snapshot an OS image to run another instance of the OS.
A duplicate fsid can't be mounted on the same system unless the fsid is
changed by using btrfstune -m.
However in some circumstances the image needs to go back to the original
fsid /metadata_uuid.
As of now btrfstune -M f
On Thu, Sep 05, 2019 at 10:06:36AM -0500, Goldwyn Rodrigues wrote:
> From: Goldwyn Rodrigues
>
> A preparation patch for copy-on-write (CoW).
> The srcmap is used to identify where the read is to be performed
> from. This is passed to iomap->begin() of the respective
> filesystem, which is suppos
On Thu, Sep 05, 2019 at 06:27:21PM +0200, Christoph Hellwig wrote:
> > + if (dio->dops && dio->dops->submit_io) {
> > + dio->dops->submit_io(bio, file_inode(dio->iocb->ki_filp),
> > + pos);
>
> pos would still fit on the previously line as-is.
>
> > +
On Thu, Sep 5, 2019 at 2:44 PM Edmund Urbani wrote:
>
> I did not need the degraded option. And so far I see no HW I/O errors in
> dmesg. I have encountered a few errors while copying files and found
> these in the log:
>
> [ 3560.273634] btrfs_print_data_csum_error: 50 callbacks suppressed
> [ 35
On 05.09.2019 21:57, Chris Murphy wrote:
On Thu, Sep 5, 2019 at 1:18 PM Edmund Urbani wrote:
On 04.09.2019 07:36, Chris Murphy wrote:
I have tried all the mount / restore options listed here:
https://forums.unraid.net/topic/46802-faq-for-unraid-v6/page/2/?tab=comments#comment-543490
Good.
On 18:23 05/09, Christoph Hellwig wrote:
> > Most of the code is "inspired" by
> > fs/btrfs/file.c. To keep the size small, all removals are in
> > following patches.
>
> Wouldn't it be better to massage the existing code into a form where you
> can fairly easily switch over to iomap? That is sta
On 18:37 05/09, Christoph Hellwig wrote:
> On Thu, Sep 05, 2019 at 10:06:37AM -0500, Goldwyn Rodrigues wrote:
> > - else if (iomap->flags & IOMAP_F_BUFFER_HEAD)
> > + } else if (iomap->flags & IOMAP_F_COW) {
> > + if (WARN_ON_ONCE(iomap->flags & IOMAP_F_BUFFER_HEAD)) {
> > +
On Thu, Sep 5, 2019 at 1:18 PM Edmund Urbani wrote:
>
>
> On 04.09.2019 07:36, Chris Murphy wrote:
> >
> >>>
> I have tried all the mount / restore options listed here:
> https://forums.unraid.net/topic/46802-faq-for-unraid-v6/page/2/?tab=comments#comment-543490
> >>> Good. Stick with ro
On 04.09.2019 07:36, Chris Murphy wrote:
I have tried all the mount / restore options listed here:
https://forums.unraid.net/topic/46802-faq-for-unraid-v6/page/2/?tab=comments#comment-543490
Good. Stick with ro attempts for now. Including if you want to try a
newer kernel. If it succeeds t
Dear Thomas,
Am 05.09.19 um 10:50 schrieb Thomas Schneider:
> Hi,
>
> I would agree with Oliver's conclusion:
> the relevant directories are all tmpfs mounts.
this of course easily explains it and btrfs can't do anything about these when
snapshotting.
In case you want to debug the issue in mo
On Thu, Sep 05, 2019 at 10:06:37AM -0500, Goldwyn Rodrigues wrote:
> - else if (iomap->flags & IOMAP_F_BUFFER_HEAD)
> + } else if (iomap->flags & IOMAP_F_COW) {
> + if (WARN_ON_ONCE(iomap->flags & IOMAP_F_BUFFER_HEAD)) {
> + status = -EIO;
> +
On Thu, Sep 05, 2019 at 10:06:49AM -0500, Goldwyn Rodrigues wrote:
> From: Goldwyn Rodrigues
>
> Update the inode size for dio writes during bio completion.
> This ties the success of the underlying block layer
> whether to increase the size of the inode. Especially for
> in aio cases.
Doesn't t
On Thu, Sep 05, 2019 at 10:06:48AM -0500, Goldwyn Rodrigues wrote:
> From: Goldwyn Rodrigues
>
> btrfs_dio_data is unnecessary since we are now storing all
> informaiton in btrfs_iomap.
>
> Advantage: We don't abuse current->journal_info anymore :)
I'd suggest just folding that into the patch r
Lots of lines > 80 chars, and various indentation errors, I'm not
going to point them out invdividually.
> ssize_t btrfs_dio_iomap_read(struct kiocb *iocb, struct iov_iter *to)
> @@ -437,7 +536,58 @@ ssize_t btrfs_dio_iomap_read(struct kiocb *iocb, struct
> iov_iter *to)
> struct inode *i
> + if (dio->dops && dio->dops->submit_io) {
> + dio->dops->submit_io(bio, file_inode(dio->iocb->ki_filp),
> + pos);
pos would still fit on the previously line as-is.
> + dio->submit.cookie = BLK_QC_T_NONE;
But I think you should return the
> +static ssize_t btrfs_file_read_iter(struct kiocb *iocb, struct iov_iter *to)
> +{
> + ssize_t ret = 0;
> + if (iocb->ki_flags & IOCB_DIRECT)
Missing empty line after the declaration.
> +ssize_t btrfs_dio_iomap_read(struct kiocb *iocb, struct iov_iter *to)
The iomap in the name doesn't
> Most of the code is "inspired" by
> fs/btrfs/file.c. To keep the size small, all removals are in
> following patches.
Wouldn't it be better to massage the existing code into a form where you
can fairly easily switch over to iomap? That is start refactoring the
code into helpers that are mostly
On 5.09.19 г. 18:37 ч., fdman...@kernel.org wrote:
> From: Filipe Manana
>
> In order to check that the filesystem generation does not change after
> failure to set a property, the test expects a specific generation number
> of 7 in its golden output. That currently works except when using the
On Mon, Aug 26, 2019 at 7:21 AM Qu Wenruo wrote:
>
> We have generic dm-logwrites with fsstress test case (generic/482), but
> it doesn't cover fs specific operations like btrfs snapshot creation and
> deletion.
>
> Furthermore, that test is not heavy enough to bump btrfs tree height by
> its shor
From: Filipe Manana
In order to check that the filesystem generation does not change after
failure to set a property, the test expects a specific generation number
of 7 in its golden output. That currently works except when using the
v2 space cache mount option (MOUNT_OPTIONS="-o space_cache=v2")
On Wed, Sep 04, 2019 at 07:33:58PM +0300, Nikolay Borisov wrote:
> When doing any form of incremental send the parent and the child trees
> need to be compared via btrfs_compare_trees. This can result in long
> loop chains without ever relinquishing the CPU. This causes softlockup
> detector to tr
From: Goldwyn Rodrigues
Set the IOMAP_F_COW flag and create the srcmap based on
current extents to read from.
Signed-off-by: Goldwyn Rodrigues
---
fs/xfs/xfs_iomap.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/fs/xfs/xfs_iomap.c b/fs/xfs/xfs_iomap.c
index 8321733c16c3..13495d8a1ee2
From: Goldwyn Rodrigues
Update the inode size for dio writes during bio completion.
This ties the success of the underlying block layer
whether to increase the size of the inode. Especially for
in aio cases.
Signed-off-by: Goldwyn Rodrigues
---
fs/btrfs/inode.c | 6 +-
1 file changed, 5 in
From: Goldwyn Rodrigues
btrfs_dio_data is unnecessary since we are now storing all
informaiton in btrfs_iomap.
Advantage: We don't abuse current->journal_info anymore :)
Signed-off-by: Goldwyn Rodrigues
---
fs/btrfs/file.c | 40
fs/btrfs/inode.c | 81 ++--
From: Goldwyn Rodrigues
btrfs_iomap_init() is a function to be used to btrfs_iomap
structure which is used to pass information between iomap
begin() and end(). All data reservations and allocations must
be performed in this function. For reads, btrfs_iomap allocation
is not required.
We perform
From: Goldwyn Rodrigues
This helps filesystems to perform tasks on the bio while
submitting for I/O. This could be post-write operations
such as data CRC or data replication for fs-handled RAID.
Signed-off-by: Goldwyn Rodrigues
---
fs/iomap/direct-io.c | 16 +++-
include/linux/iom
From: Goldwyn Rodrigues
Add btrfs_dio_iomap_ops for iomap.begin() function. In order to
accomodate dio reads, add a new function btrfs_file_read_iter()
which would call btrfs_dio_iomap_read() for DIO reads and
fallback to generic_file_buffered_read otherwise.
Changed parameter written in generic
From: Goldwyn Rodrigues
Since we will be using it in another part of the code, use a
better name to declare it non-static
Signed-off-by: Goldwyn Rodrigues
---
fs/btrfs/ctree.h | 7 +--
fs/btrfs/inode.c | 14 +-
2 files changed, 10 insertions(+), 11 deletions(-)
diff --git a/f
From: Goldwyn Rodrigues
Better done in a separate patch to keep the main patch short(er)
Signed-off-by: Goldwyn Rodrigues
---
fs/btrfs/file.c | 463
1 file changed, 463 deletions(-)
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
index 0
From: Goldwyn Rodrigues
This makes btrfs_get_extent_map_write() independent of Direct
I/O code.
Signed-off-by: Goldwyn Rodrigues
---
fs/btrfs/ctree.h | 2 ++
fs/btrfs/inode.c | 40 +++-
2 files changed, 29 insertions(+), 13 deletions(-)
diff --git a/fs/btr
From: Goldwyn Rodrigues
A preparation patch for copy-on-write (CoW).
The srcmap is used to identify where the read is to be performed
from. This is passed to iomap->begin() of the respective
filesystem, which is supposed to put in the details for
reading before performing the copy for CoW.
Signe
From: Goldwyn Rodrigues
While most of the code works just eliminating page's private
field and related code, there is a problem when we are cloning.
The extent assumes the data is uptodate. Clear the EXTENT_UPTODATE
flag for the extent so the next time the file is read, it is
forced to be read fr
From: Goldwyn Rodrigues
Export generic_file_buffered_read() to be used to
supplement incomplete direct reads.
While we are at it, correct the comments and variable names.
Signed-off-by: Goldwyn Rodrigues
---
include/linux/fs.h | 2 ++
mm/filemap.c | 13 +++--
2 files changed, 9
From: Goldwyn Rodrigues
In case of a IOMAP_F_COW, read a page from the srcmap before
performing a write on the page.
Signed-off-by: Goldwyn Rodrigues
Reviewed-by: Darrick J. Wong
---
fs/iomap/buffered-io.c | 30 +-
include/linux/iomap.h | 3 +++
2 files changed,
From: Goldwyn Rodrigues
Set iomap->flags to IOMAP_F_COW and fill up the source map in case
the I/O is not page aligned.
Signed-off-by: Goldwyn Rodrigues
---
fs/btrfs/iomap.c | 42 +-
1 file changed, 41 insertions(+), 1 deletion(-)
diff --git a/fs/btrfs/
From: Goldwyn Rodrigues
This one is a long patch. Most of the code is "inspired" by
fs/btrfs/file.c. To keep the size small, all removals are in
following patches.
Signed-off-by: Goldwyn Rodrigues
---
fs/btrfs/Kconfig | 1 +
fs/btrfs/Makefile | 2 +-
fs/btrfs/ctree.h | 1 +
fs/btrfs/fi
Previously called btrfs iomap.
This is an effort to use iomap for btrfs. This would keep most
responsibility of page handling during writes in iomap code, hence
code reduction. For CoW support, changes are needed in iomap code
to make sure we perform a copy before the write.
This is in line with t
On Wed, Sep 04, 2019 at 08:22:39PM +0300, Nikolay Borisov wrote:
> Those function are simple boolean predicates there is no need to assign
> their return values to interim variables. Use them directly as
> predicates. No functional changes.
>
> Signed-off-by: Nikolay Borisov
Added to misc-next,
Hi,
btrfs-progs version 5.2.2 have been released. This is a bugfix release.
Changes:
* check:
* fix false report of wrong byte count for orphan inodes
* option -E was not handled correctly
* new check and repair for root item generation
* balance: check for full-balance before bac
On 2019/9/5 下午9:06, Anand Jain wrote:
>
>
>> On 5 Sep 2019, at 1:55 AM, Chris Murphy wrote:
>>
>> On Wed, Sep 4, 2019 at 12:16 AM Swâmi Petaramesh
>> wrote:
>>>
>>> Hi list,
>>>
>>> Is there an advised way to completely “clone” a complete BTRFS
>>> filesystem, I mean to get an exact copy of a
> On 5 Sep 2019, at 1:55 AM, Chris Murphy wrote:
>
> On Wed, Sep 4, 2019 at 12:16 AM Swâmi Petaramesh wrote:
>>
>> Hi list,
>>
>> Is there an advised way to completely “clone” a complete BTRFS
>> filesystem, I mean to get an exact copy of a BTRFS filesystem including
>> subvolumes (even rea
On 05/09/2019 14:16, Johannes Thumshirn wrote:
> On 05/09/2019 04:10, Dave Chinner wrote:
>> On Wed, Sep 04, 2019 at 12:13:26PM -0700, Omar Sandoval wrote:
>>> From: Omar Sandoval
>>>
>>> This adds an API for writing compressed data directly to the filesystem.
>>> The use case that I have in mind
On 05/09/2019 04:10, Dave Chinner wrote:
> On Wed, Sep 04, 2019 at 12:13:26PM -0700, Omar Sandoval wrote:
>> From: Omar Sandoval
>>
>> This adds an API for writing compressed data directly to the filesystem.
>> The use case that I have in mind is send/receive: currently, when
>> sending data from
On Fri, Jul 26, 2019 at 05:13:21PM +0200, David Sterba wrote:
> On Wed, Jul 10, 2019 at 12:28:13PM -0700, Tejun Heo wrote:
> > Hello,
> >
> > This patchset contains only the btrfs part of the following patchset.
> >
> > [1] [PATCHSET v2 btrfs/for-next] blkcg, btrfs: fix cgroup writeback
> > su
On 4.09.19 г. 22:13 ч., Omar Sandoval wrote:
> From: Omar Sandoval
>
> This adds an API for writing compressed data directly to the filesystem.
> The use case that I have in mind is send/receive: currently, when
> sending data from one compressed filesystem to another, the sending side
> decom
Hi,
I would agree with Oliver's conclusion:
the relevant directories are all tmpfs mounts.
root@ld5505:~# mount | grep /var
/dev/sdbq3 on /var/cache type btrfs
(rw,noatime,compress=lzo,ssd,space_cache=v2,subvolid=260,subvol=/@cache)
/dev/sdbq3 on /var/lib/vz/images type btrfs
(rw,noatime,compr
Looks good,
Reviewed-by: Johannes Thumshirn
--
Johannes ThumshirnSUSE Labs Filesystems
jthumsh...@suse.de+49 911 74053 689
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5
90409 Nürnberg
Germany
(HRB 247165, AG München)
Key fingerprin
For lowmem mode, if we hit a bad inode mode, normally it is reported
when we checking the DIR_INDEX/DIR_ITEM of the parent inode.
If we didn't repair at that timing, the error will be recorded even we
fixed it later.
So this patch will check for INODE_ITEM_MISMATCH error type, and if it's
really
Before this patch, repair_imode_common() can only handle two types of
inodes:
- Free space cache inodes
- ROOT DIR inodes
For inodes in subvolume trees, the core complexity is how to determine the
correct imode, thus it was not implemented.
However there are more reports of incorrect imode in sub
To make original mode to repair imode error in subvolume trees, this
patch will do:
- Remove the show-stopper checks for root->objectid.
Now repair_imode_original() will accept inodes in subvolume trees.
- Export detect_imode() for original mode
Due to the call requirement, original mode must
Add new test image for imode repair in subvolume trees.
Also rename the existing test case 039-bad-free-space-cache-inode-mode
to 039-bad-inode-mode, since now we can fix all bad imode.
And add the beacon file for lowmem test.
Signed-off-by: Qu Wenruo
---
.../039-bad-inode-mode/.lowmem_repaira
Introduce a function, find_file_type(), to find filetype using
INODE_REF.
This function will:
- Search DIR_INDEX first
DIR_INDEX is easier since there is only one item in it.
- Valid the DIR_INDEX item
If the DIR_INDEX is valid, use the filetype and call it a day.
- Search DIR_ITEM then
- V
This function will be later used by common mode code, so export it.
Signed-off-by: Qu Wenruo
---
check/main.c| 15 ---
check/mode-common.h | 15 +++
2 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/check/main.c b/check/main.c
index 2e16b4e6f05b..90
Before this patch, btrfs check can only repair bad free space cache
inode mode (as it was the first case detected by tree-checker and reported)
But Murphy is always right, what may happen will finally happen, we have
users reporting bad inode mode in subvolume trees.
According to the creation time
58 matches
Mail list logo