Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>
To: Ed Tomlinson <edt@aei.ca>, <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH 0/6] More generic inode nlink repair function
Date: Wed, 3 Dec 2014 16:12:49 +0900	[thread overview]
Message-ID: <547EB7F1.9090408@jp.fujitsu.com> (raw)
In-Reply-To: <2026580.dXZxrES2AW@grover>

Hi,

(2014/12/03 14:03), Ed Tomlinson wrote:
> Hi,
>
> I'd really like to see these patches included in btrfsck - they repaired my fs.   Once
> Qu got them working they found additional corruptions.  This time there was no crash or stall
> just an umount that left (chromium) files unlinked...  The bug with these files has been
> hitting me for a while - just did not recognize what was causing it or notice the corruption.
>
> The only objection I have seen to these patches is that they may create a "lost+found"
> directory.  I submit this is an expected behavior for a fsck utility.  When --repair is specified
> I expect a fsck to make changes to my fs one of which may be adding and populating a
> lost+found directory.

How about making lost+found on mkfs.btrfs like ext4?

Thanks,
Satoru

>
> Thanks
> Ed Tomlinson
>
> PS. It would be very interesting to find out WHY these files are ending up unlinked.  Ideas?
>
>
> On Wednesday 03 December 2014 12:18:26 you wrote:
>> Update on patch 4 and 6, other is not changed.
>> This nlink repair function is more generic than the original one.
>>
>> The old one can only handle a specific case that the inode_ref is
>> invalid, either point to a non-exist parent inode or point to a invalid
>> inode(not dir or conflicting index/name).
>>
>> The new one will reset all the backref, no matter it is valid or not,
>> and re-add all the valid backref, this make the nlink handles more
>> corrupt cases.
>>
>> Qu Wenruo (6):
>>    btrfs-progs: print root dir verbose error in fsck
>>    btrfs-progs: Import btrfs_insert/del/lookup_extref() functions.
>>    btrfs-progs: Import lookup/del_inode_ref() function.
>>    btrfs-progs: Add btrfs_unlink() and btrfs_add_link() functions.
>>    btrfs-progs: Add btrfs_mkdir() function for the incoming 'lost+found'
>>         fsck mechanism.
>>    btrfs-progs: Add fixing function for inodes whose nlink dismatch
>>
>>   Makefile     |   2 +-
>>   cmds-check.c | 311 ++++++++++++++++++++++++++++++++++++--
>>   ctree.c      |   6 +
>>   ctree.h      |  38 +++++
>>   inode-item.c | 318 +++++++++++++++++++++++++++++++++++++++
>>   inode.c      | 484 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>>   6 files changed, 1148 insertions(+), 11 deletions(-)
>>   create mode 100644 inode.c
>>
>>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>


  reply	other threads:[~2014-12-03  7:12 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-03  4:18 [PATCH 0/6] More generic inode nlink repair function Qu Wenruo
2014-12-03  4:18 ` [PATCH RESEND 1/6] btrfs-progs: print root dir verbose error in fsck Qu Wenruo
2014-12-03  4:18 ` [PATCH RESEND 2/6] btrfs-progs: Import btrfs_insert/del/lookup_extref() functions Qu Wenruo
2014-12-03  4:18 ` [PATCH RESEND 3/6] btrfs-progs: Import lookup/del_inode_ref() function Qu Wenruo
2014-12-03  4:18 ` [PATCH v3 4/6] btrfs-progs: Add btrfs_unlink() and btrfs_add_link() functions Qu Wenruo
2014-12-03  4:18 ` [PATCH RESEND v2 5/6] btrfs-progs: Add btrfs_mkdir() function for the incoming 'lost+found' fsck mechanism Qu Wenruo
2014-12-03  4:18 ` [PATCH v2 6/6] btrfs-progs: Add fixing function for inodes whose nlink dismatch Qu Wenruo
2014-12-03 14:30   ` Ed Tomlinson
2014-12-03  5:03 ` [PATCH 0/6] More generic inode nlink repair function Ed Tomlinson
2014-12-03  7:12   ` Satoru Takeuchi [this message]
2014-12-03  7:41     ` Qu Wenruo
2014-12-04 17:20       ` David Sterba
2014-12-05  1:11         ` Qu Wenruo
2014-12-04 17:27 ` David Sterba

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=547EB7F1.9090408@jp.fujitsu.com \
    --to=takeuchi_satoru@jp.fujitsu.com \
    --cc=edt@aei.ca \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox