From: Robert Peterson <rpeterso@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH] GFS2: kernel changes to support new gfs2_grow command (Try 3)
Date: Fri, 04 May 2007 16:35:08 -0500 [thread overview]
Message-ID: <463BA70C.60507@redhat.com> (raw)
In-Reply-To: <20070504164735.GC4659@redhat.com>
David Teigland wrote:
> On Wed, May 02, 2007 at 08:57:08PM -0500, Robert Peterson wrote:
>> + __u64 fs_total, new_free, new_free_readable;
>
> use u64, __u64 is for structs shared with user space
Okay.
>> + printk(KERN_WARNING "GFS2: File system extended by %llu "
>> + "blocks (%llu%cB)\n", new_free, new_free_readable,
>> + stg_abbrev[factor]);
>
> use fs_warn(), and unless there's some precedent elsewhere I don't think
> the human-readable translation is appropriate in the kernel.
Okay.
>> + if (!gfs2_glock_is_held_excl(ip->i_gl) &&
>> + !gfs2_glock_is_held_shrd(ip->i_gl) &&
>
> Be extremely wary of using these "is_held" functions algorithmically;
> needing to use them is usually an indication that you're doing something
> wrong (I'll have to study this case a bit more to say anything helpful).
I was using these functions to determine if someone was doing
writes to the rindex file through the meta_fs, in which case I
don't want to exit with a consistency error. If the rindex is being
written to, there may be partial pieces of rindex entries
left on a page (i.e. between two gfs2_write_commits) before the
writing is over. In these cases, it's normal and we should ignore
the partial entries (and re-read them when the writing is complete
and the version number has changed).
My concern here is if a different node decides to do an ri_update
while a gfs2_grow is happening. For example, if someone does a
mount of the file system on a different node, the rindex may
briefly be in an inconsistent state.
> It's instructional to note that the glock_is_held functions are _never_
> used outside of assertions in all of gfs1 and gfs2! There's an exception
> to every rule, but...
Yeah, I noticed that.
> Dave
Bob Peterson
Red Hat Cluster Suite
next prev parent reply other threads:[~2007-05-04 21:35 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-03 1:57 [Cluster-devel] [PATCH] GFS2: kernel changes to support new gfs2_grow command (Try 3) Robert Peterson
2007-05-04 16:47 ` David Teigland
2007-05-04 21:35 ` Robert Peterson [this message]
2007-05-04 22:16 ` David Teigland
2007-05-04 19:37 ` David Teigland
2007-05-04 21:37 ` Robert Peterson
2007-05-08 14:56 ` Robert Peterson
2007-05-04 20:23 ` David Teigland
2007-05-04 21:48 ` Robert Peterson
2007-05-04 22:04 ` David Teigland
2007-05-08 14:17 ` Robert Peterson
2007-05-08 14:24 ` Steven Whitehouse
-- strict thread matches above, loose matches on Subject: below --
2007-05-08 20:42 David Teigland
2007-05-08 20:43 David Teigland
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=463BA70C.60507@redhat.com \
--to=rpeterso@redhat.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.