All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tao Ma <tao.ma@oracle.com>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [PATCH 4/4] Implement "GROUP_ADD" for online	resize.take 3
Date: Sat Dec 15 00:44:13 2007	[thread overview]
Message-ID: <47639382.80704@oracle.com> (raw)
In-Reply-To: <20071215000739.GD7300@mail.oracle.com>

Joel Becker Wrote:
> On Fri, Dec 14, 2007 at 03:56:41PM +0800, Tao Ma wrote:
>   
>> 2. For every new groups, tunefs.ocfs2 will call OCFS2_IOC_GROUP_ADD
>>    to add them one by one. The new group descriptor is initialized
>>    in userspace, we only check it in the kernel and update the
>>    global_bitap, super blocks etc.
>>     
>
> 	I like the patches overall.  They are clean and straightforward.
>
>   
>> +	if (cluster < total_clusters)
>> +		mlog(0, "add a group which is in the current volume.\n");
>> +	else if (input->chain >= cl_count)
>> +		mlog(0, "input chain exceeds the limit.\n");
>> +	else if (next_free != cl_count && next_free != input->chain)
>> +		mlog(0, "the add group should be in chain %u\n", next_free);
>> +	else if (total_clusters + input->clusters < total_clusters)
>> +		mlog(0, "add group's clusters overflow.\n");
>> +	else if (input->clusters > cl_cpg)
>> +		mlog(0, "the cluster exceeds the maximum of a group\n");
>> +	else if (input->frees > input->clusters)
>> +		mlog(0, "the free cluster exceeds the total clusters\n");
>> +	else if (total_clusters % cl_cpg != 0)
>> +		mlog(0, "the last group isn't full. Use group extend first.\n");
>> +	else if (input->group != ocfs2_which_cluster_group(inode, cluster))
>> +		mlog(0, "group blkno is invalid\n");
>> +	else if ((ret = ocfs2_check_new_group(inode, di, input, group_bh)))
>> +		mlog(0, "group descriptor check failed.\n");
>> +	else
>> +		ret = 0;
>>     
>
> 	These are some great errors, but the user will never see them.
> tunefs.ocfs2 will just report "Invalid argument", which isn't very
> helpful.  The same goes for the errors in the group check function,
> which returns -EIO.  I'd love to see a way for the user to see them.
> Either targeted errno values that tunefs can translate into strings, or
> mlogs in dmesg so that tunefs can say "see dmesg for more info".
> Something like that.  Mark points out that this should only be for real
> errors, not things that are "normal operation" like ENOSPC.
>   
Yeah, so maybe I need to use mlog(ML_ERROR,...) so that the user can see 
it in dmesg and let tunefs.ocfs2 print out "see dmesg for more details".
Thanks for your review.

      reply	other threads:[~2007-12-15  0:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-13 23:40 [Ocfs2-devel] [PATCH 0/4] Add online resize support for ocfs2, take 3 Tao Ma
2007-12-13 23:54 ` [Ocfs2-devel] [PATCH 1/4] Initalize bitmap_cpg of ocfs2_super to be the maximum,take 3 Tao Ma
2007-12-13 23:55 ` [Ocfs2-devel] [PATCH 2/4] Add new ioctl number for OCFS2.take 2 Tao Ma
2007-12-17 14:00   ` Mark Fasheh
2007-12-13 23:57 ` [Ocfs2-devel] [PATCH 3/4] Add group extend for online resize.take 3 Tao Ma
2007-12-17 14:10   ` Mark Fasheh
2007-12-13 23:58 ` [Ocfs2-devel] [PATCH 4/4] Implement "GROUP_ADD" " Tao Ma
2007-12-14 16:08   ` Joel Becker
2007-12-15  0:44     ` Tao Ma [this message]

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=47639382.80704@oracle.com \
    --to=tao.ma@oracle.com \
    --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.