All of lore.kernel.org
 help / color / mirror / Atom feed
From: Goldwyn Rodrigues <rgoldwyn@suse.de>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [RFC] Online File(system) check
Date: Tue, 28 Apr 2015 07:21:42 -0500	[thread overview]
Message-ID: <553F7B56.2010909@suse.de> (raw)
In-Reply-To: <553F6853020000F90000822C@relay2.provo.novell.com>

Hi Gang,

On 04/27/2015 10:00 PM, Gang He wrote:
> Hi Glodwyn,
>
> Very nice proposal.
> So far, there are some comments from me.
> 1) which task will we do in check/fix a file, we need to define the detailed requirements further, since we just do a light-level file check/fix according to inode number, we need to know which items can be done by online check, which items can be done by offline fsck.

For the first phase (regular files), these are all the reasons the disk 
validate function would fail. Some examples are 
ocfs2_validate_inode_block, ocfs2_validate_extent_block etc.
As we take up system inodes (phase 2), we will add more functionality.

> 2) can we keep check and fix two option, check option is to check if a file is good or bad, but not modify anything, fix option is to check and fix a file if the file is corrupted.

Yes, there are two options, CHECKS only checks wheras FIX fixes the 
errors. As a precautionary measure, a CHECK command should be provided 
before a FIX is issued. IOW, a file should be checked for errors before 
actually fixing it.

> 3) when users execute the command "echo CHECK <inode> > /sys/fs/ocfs2/filecheck" to check a file, how to give the feedback information besides printing the messages to syslog?

The output should be when you cat /sys/fs/ocfs2/filecheck. It would 
provide the results of the last (N) files checked. I don't want to flood 
the kernel log with this. Thanks for bringing this up, I will put it on 
the doc. Something like:

Inode Status Description
1234   ERROR Metadata incorrect
2352   FIXED Valid flag not set
9382   CHECKING -
8926   GOOD -
7230   CANT-FIX Please execute fsck.ocfs2 after taking filesystem offline.

So, for the current scenario, only 1234 can be fixed. An echo should err 
with EINVAL if any other inode number is provided with FIX.


> 4) we should support a list to accept the "check/fix" requests from user-space and queue them, then handle them one by one, right? what is the behavior for the request user which execute "echo check ..." from the user space? the user post a request to the kernel space, then the command will end or wait for the file check end?
>

I would not suggest that, atleast for now. This is to improve 
availability. However, if the filesystem is very bad, we should suggest 
an offline check. However, the user can provide multiple CHECK requests.

-- 
Goldwyn

  reply	other threads:[~2015-04-28 12:21 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-27 21:32 [Ocfs2-devel] [RFC] Online File(system) check Goldwyn Rodrigues
2015-04-28  3:00 ` Gang He
2015-04-28 12:21   ` Goldwyn Rodrigues [this message]
2015-04-28 13:20     ` Joseph Qi
2015-04-29  2:37       ` Gang He
2015-04-30  2:29         ` Joseph Qi
2015-05-02 12:52         ` Goldwyn Rodrigues
2015-05-02 13:08       ` Goldwyn Rodrigues
2015-05-04  1:46         ` Joseph Qi
2015-04-29  7:59 ` Junxiao Bi
2015-05-02 12:45   ` Goldwyn Rodrigues
2015-05-04  2:55     ` Junxiao Bi

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=553F7B56.2010909@suse.de \
    --to=rgoldwyn@suse.de \
    --cc=ocfs2-devel@oss.oracle.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.