[PVFS-developers] metadata file size checking
Porter Don
PorterDE at mercury.hendrix.edu
Wed May 19 14:46:45 EDT 2004
Whatever makes the most sense. I think some functions call meta_open
directly, which perhaps they shouldn't.
For instance, md_chmod calls meta_open, which could still hose up the
metadata if it were too small.
So, we should either eliminate the check in md_open, or reduce our calls to
meta_open, IMHO.
don
-----Original Message-----
From: Rob Ross
To: Porter Don
Cc: 'pvfs-developers at www.beowulf-underground.org'
Sent: 5/19/04 12:48 PM
Subject: Re: [PVFS-developers] metadata file size checking
Don,
Also, there's another, very similar test in md_open() to look for
correct
metadata files. We should try to get back down to one test -- I'm
guessing that the meta_open() point is catching some cases that the
md_open() does not, so we should consider dropping that one...
Rob
On Wed, 19 May 2004, Rob Ross wrote:
> Don,
>
> I've applied your patch to CVS, but I'm thinking I might simplify this
a
> bit more before we're done.
>
> Here's what I'm thinking: rather than having meta_creat() call
meta_open()
> at the end, just have it explicitly re-open on its own. This will
allow
> us to avoid the extra write() of dummy data.
>
> I've attached a patch. Lemme know what you think. Sorry that there
is
> formatting junk in there that is distracting from the real purpose.
>
> And thanks for the original patch!
>
> Rob
>
> On Thu, 6 May 2004, Porter Don wrote:
>
> > I wanted to implement some protection against overwriting a metadata
file
> > that has not had the migration script run on it after an upgrade.
So I
> > ended up stat-ing the file in meta-open and if it is not a directory
and its
> > size is not the same as a struct fmeta, then the manager will return
an
> > EINVAL (open to suggestions for better error code) and print a
message to
> > logs. See below:
>
More information about the PVFS-developers
mailing list