Skip Menu | Logged in as guest | Logout
 
The Basics
Id: 1493
Status: resolved
Priority: 0/
Queue: openafs-bugs

Dates
Created: Fri May 23 19:19:02 2003
Starts: Not set
Started: Mon Jun 02 10:39:11 2003
Last Contact: Not set
Due: Not set
Closed: Mon Sep 04 11:12:31 2006
Updated: Mon Sep 04 11:12:31 2006 by shadow

History Brief headersFull headers
Date: Fri, 23 May 2003 19:18:56 -0400
From: "R. Lindsay Todd" <toddr@rpi.edu>
To: openafs-bugs@openafs.org
Subject: beginning resurrection of largefile support
Download (untitled)
text/plain 1.4k
Attached to this message are:

1) A set of changes to add a "make splint" target to the src/viced,
src/vol, and src/volser directories, and assorted type casts, etc. to
make splint happier. Splint is a "better lint" which can detect things
like long integer values being assigned to non-long integers, etc.

2) A ".splintrc" file that needs to go into each of src/viced, src/vol,
and src/volser.

3) A patch to refactor the SRXAFS_StoreData* calls, create some types
for file offsets and sizes, and use macros in vnode.h to get or set the
lengths of files. At this point, no integer types are actually
expanded. It will not yet support largefile file service. If you
define AFS_LARGEFILE_ENV, it will not work, and almost certainly will
corrupt data. (Which is why I am not submitting autoconf changes at
this time!) But it should be a verifiably safe step that gets us more
than half way toward getting large file server support working again.

One important change from the last time I tried this: As Nathan
Neulinger suggested, I am using the reserved6 vnode field to hold the
high order bits of a file length. At least, that is what the macros
would do if they were used. Nothing yet should actually cause this to
happen.

--
R. Lindsay Todd email: toddr@rpi.edu
Senior Systems Programmer phone: 518-276-2605
Rensselaer Polytechnic Institute fax: 518-276-2809
Troy, NY 12180-3590 WWW: http://www.rpi.edu/~toddr
Download splint-1.diff
text/plain 52.6k

Message body not shown because it is too large.

Download .splintrc
text/plain 160b
-badflag
-weak
+unix-lib
+char-index
+relax-quals
-pred-bool-int
-pred-bool-ptr
+ptr-negate
-fixed-formal-array
+match-any-integral
+ignore-equals
-name-checks
Download rf.diff
text/plain 16k

Message body not shown because it is too large.

Subject: Re: beginning resurrection of largefile support
Download (untitled)
text/plain 106b

Can you send the splint diff as context or unified? The
attached copy is (whatever the other format is)
Subject: Re: beginning resurrection of largefile support
Download (untitled)
text/plain 107b
The choice of afs_fsize_t and afs_fssize_t seems unfortunate,
in the sense that they are easily confused.
Date: Wed, 28 May 2003 14:36:42 -0400
From: "R. Lindsay Todd" <toddr@rpi.edu>
To: openafs-bugs@openafs.org
Subject: [grand.central.org #1493] Re: beginning resurrection of largefile support
Download (untitled)
text/plain 43b
sorry about that, it was a plain cvs diff.
Download splint-u.diff
text/plain 92.3k

Message body not shown because it is too large.

Date: Wed, 28 May 2003 14:45:55 -0400
From: "R. Lindsay Todd" <toddr@rpi.edu>
To: openafs-bugs@openafs.org
Subject: [grand.central.org #1493] Re: beginning resurrection of largefile support
Download (untitled)
text/plain 641b
Derrick Brashear via RT wrote:

>The choice of afs_fsize_t and afs_fssize_t seems unfortunate,
>in the sense that they are easily confused.
>
>
I am open to other suggestions! In short:

afs_fsize_t = posix size_t (unsigned, nonsensical to have a negative size)
afs_fssize_t = posix ssize_t (results of read etc., which must include -1)
afs_foff_t = posix off_t (offsets, must be signed)

There are existing afs_size_t and afs_offs_t, but their length depends
on large file support in the client (which might be separate from large
file in the server), their signedness is wrong, and ssize_t is a useful
distinct type abstraction.
Subject: Re: beginning resurrection of largefile support
Download (untitled)
text/plain 931b
[toddr@rpi.edu - Wed May 28 14:45:58 2003]:

> Derrick Brashear via RT wrote:
>
> >The choice of afs_fsize_t and afs_fssize_t seems unfortunate,
> >in the sense that they are easily confused.
> >
> >
> I am open to other suggestions! In short:
>
> afs_fsize_t = posix size_t (unsigned, nonsensical to have a negative size)
> afs_fssize_t = posix ssize_t (results of read etc., which must include -1)
> afs_foff_t = posix off_t (offsets, must be signed)
>
> There are existing afs_size_t and afs_offs_t, but their length depends
> on large file support in the client (which might be separate from large
> file in the server), their signedness is wrong, and ssize_t is a useful
> distinct type abstraction.

No argument. Reading the diff got confusing because of the similarity of
fssize and fsize. afsf_size_t and afsf_usize_t? Substitute afss for afsf in
the previous example? Something else?


Date: Thu, 29 May 2003 15:14:24 -0400
From: "R. Lindsay Todd" <toddr@rpi.edu>
To: openafs-bugs@openafs.org
Subject: [grand.central.org #1493] Re: beginning resurrection of largefile support
Download (untitled)
text/plain 665b
Derrick Brashear via RT wrote:

>No argument. Reading the diff got confusing because of the similarity of
>fssize and fsize. afsf_size_t and afsf_usize_t? Substitute afss for afsf in
>the previous example? Something else?
>
I would argue against afsf_usize_t, since the unsigned version should be
the common usage; signed is only if a negative error value is also being
used.

afsf_size_t, afsf_ssize_t would work... But we already have afs_size_t.

afs_f_size_t, afs_f_ssize_t would be possible, but I think these are
getting too long.

afs_fsize_t, afs_sfsize_t? More distinguisable, a little less parallel
to size, ssize (but one might argue otherwise).
Subject: Re: beginning resurrection of largefile support
Download (untitled)
text/plain 265b

> afs_fsize_t, afs_sfsize_t? More distinguisable, a little less parallel
> to size, ssize (but one might argue otherwise).

I think it's less confusing, at least. Should I just use sed or do you want to
send a refreshed patch to ensure you'll match exactly?
Date: Fri, 30 May 2003 18:44:24 -0400
From: "R. Lindsay Todd" <toddr@rpi.edu>
To: openafs-bugs@openafs.org
Subject: [grand.central.org #1493] Re: beginning resurrection of largefile support
Download (untitled)
text/plain 847b
Attached are two patches.

logclean.diff cleans up some more logging function calls in vol and
volser, with some prototypes, refactoring, and splint annotations (to
hopefully catch format mismatches).

rf2.diff is a replacement for the earlier rf.diff, with the new name for
afs_sfsize_t. It compiles, but hasn't been tested (yet) like rf.diff
was. It should only be the type renaming, so that shouldn't be a problem.

Derrick Brashear via RT wrote:

>I think it's less confusing, at least. Should I just use sed or do you want to
>send a refreshed patch to ensure you'll match exactly?
>
>

--
R. Lindsay Todd email: toddr@rpi.edu
Senior Systems Programmer phone: 518-276-2605
Rensselaer Polytechnic Institute fax: 518-276-2809
Troy, NY 12180-3590 WWW: http://www.rpi.edu/~toddr
Download logclean.diff
text/plain 9.8k
diff -u src/vol/clone.c src/vol/clone.c
--- src/vol/clone.c 27 May 2003 19:31:24 -0000
+++ src/vol/clone.c 29 May 2003 18:59:47 -0000
@@ -59,6 +59,8 @@
#include "partition.h"
#include "viceinode.h"

+/*@printfline@*/ extern void Log(const char *format, ...);
+
int (*vol_PollProc)() = 0; /* someone must init this */

#define ERROR_EXIT(code) {error = code; goto error_exit;}
diff -u src/vol/fssync.c src/vol/fssync.c
--- src/vol/fssync.c 27 May 2003 19:31:24 -0000
+++ src/vol/fssync.c 29 May 2003 18:59:47 -0000
@@ -82,6 +82,8 @@
#include "volume.h"
#include "partition.h"

+/*@printflike@*/ extern void Log(const char *format, ...);
+
#ifdef osi_Assert
#undef osi_Assert
#endif
diff -u src/vol/namei_ops.c src/vol/namei_ops.c
--- src/vol/namei_ops.c 27 May 2003 19:31:24 -0000
+++ src/vol/namei_ops.c 29 May 2003 18:59:47 -0000
@@ -44,6 +44,8 @@
#include "partition.h"
#include <afs/errors.h>

+/*@printflike@*/ extern void Log(const char *format, ...);
+
extern char *volutil_PartitionName_r(int volid, char *buf, int buflen);

int namei_iread(IHandle_t *h, int offset, char *buf, int size)
diff -u src/vol/vnode.c src/vol/vnode.c
--- src/vol/vnode.c 27 May 2003 19:31:24 -0000
+++ src/vol/vnode.c 29 May 2003 18:59:47 -0000
@@ -63,6 +63,8 @@
#endif /* AFS_NT40_ENV */
#include <sys/stat.h>

+extern void Abort(const char *format, ...);
+

struct VnodeClassInfo VnodeClassInfo[nVNODECLASSES];

diff -u src/vol/vol-salvage.c src/vol/vol-salvage.c
--- src/vol/vol-salvage.c 27 May 2003 19:31:25 -0000
+++ src/vol/vol-salvage.c 29 May 2003 18:59:47 -0000
@@ -391,7 +391,9 @@


/* Forward declarations */
-void Log(), Abort(), Exit();
+/*@printflike@*/ void Log(const char *format, ...);
+/*@printflike@*/ void Abort(const char *format, ...);
+void Exit(int code);
int Fork(void);
int Wait(char *prog);
char * ToString(char *s);
@@ -3659,39 +3661,49 @@
}
}

-void Log(a,b,c,d,e,f,g,h,i,j,k)
-char *a, *b, *c, *d, *e, *f, *g, *h, *i, *j, *k;
+void Log(const char *format, ...)
{
struct timeval now;
+ va_list args;

+ va_start(args, format);
#ifndef AFS_NT40_ENV
- if ( useSyslog )
- {
- syslog(LOG_INFO, a,b,c,d,e,f,g,h,i,j,k);
- } else
+ if ( useSyslog )
+ {
+ char tmp[1024];
+ (void) vsnprintf(tmp, sizeof tmp, format, args);
+ syslog(LOG_INFO, "%s", tmp);
+ } else
#endif
- {
- gettimeofday(&now, 0);
- fprintf(logFile, "%s ", TimeStamp(now.tv_sec, 1));
- fprintf(logFile, a,b,c,d,e,f,g,h,i,j,k);
- fflush(logFile);
- }
+ {
+ gettimeofday(&now, 0);
+ fprintf(logFile, "%s ", TimeStamp(now.tv_sec, 1));
+ vfprintf(logFile, format, args);
+ fflush(logFile);
+ }
+ va_end(args);
}

-void Abort(a,b,c,d,e,f,g,h,i,j,k)
-char *a, *b, *c, *d, *e, *f, *g, *h, *i, *j, *k;
+void Abort(const char *format, ...)
{
+ va_list args;
+
+ va_start(args, format);
#ifndef AFS_NT40_ENV
- if ( useSyslog )
- {
- syslog(LOG_INFO, a,b,c,d,e,f,g,h,i,j,k);
- } else
+ if ( useSyslog )
+ {
+ char tmp[1024];
+ (void) vsnprintf(tmp, sizeof tmp, format, args);
+ syslog(LOG_INFO, "%s", tmp);
+ } else
#endif
- {
- fprintf(logFile, a,b,c,d,e,f,g,h,i,j,k);
- fflush(logFile);
- if (ShowLog) showlog();
- }
+ {
+ vfprintf(logFile, format, args);
+ fflush(logFile);
+ if (ShowLog) showlog();
+ }
+ va_end(args);
+
if (debug)
abort();
Exit(1);
diff -u src/vol/volume.c src/vol/volume.c
--- src/vol/volume.c 27 May 2003 19:31:25 -0000
+++ src/vol/volume.c 29 May 2003 18:59:47 -0000
@@ -145,6 +145,8 @@
extern void *calloc(), *realloc();
#endif

+/*@printflike@*/ extern void Log(const char* format, ...);
+
/* Forward declarations */
static Volume *attach2();
static void FreeVolume();
diff -u src/vol/vutil.c src/vol/vutil.c
--- src/vol/vutil.c 27 May 2003 19:31:25 -0000
+++ src/vol/vutil.c 29 May 2003 18:59:47 -0000
@@ -64,6 +64,8 @@
#include <strings.h>
#endif

+/*@printflike@*/ extern void Log(const char *format, ...);
+
void AssignVolumeName();
void AssignVolumeName_r();
void ClearVolumeStats();
diff -u src/volser/dumpstuff.c src/volser/dumpstuff.c
--- src/volser/dumpstuff.c 27 May 2003 19:31:25 -0000
+++ src/volser/dumpstuff.c 29 May 2003 18:59:47 -0000
@@ -51,6 +51,8 @@
#include "volser.h"
#include "volint.h"

+/*@printflike@*/ extern void Log(const char *format, ...);
+
extern int DoLogging;

/* This iod stuff is a silly little package to emulate the old qi_in stuff, which
diff -u src/volser/volprocs.c src/volser/volprocs.c
--- src/volser/volprocs.c 27 May 2003 19:31:25 -0000
+++ src/volser/volprocs.c 29 May 2003 18:59:48 -0000
@@ -71,6 +71,8 @@
extern struct afsconf_dir *tdir;
extern char *volutil_PartitionName();

+extern void LogError(afs_int32 errcode);
+
/* Forward declarations */
static int GetPartName(afs_int32 partid, char *pname);

only in patch2:
unchanged:
--- src/util/afsutil.h 15 May 2003 16:27:59 -0000 1.14
+++ src/util/afsutil.h 29 May 2003 18:59:46 -0000
@@ -30,8 +30,10 @@
extern int serverLogSyslogFacility;
extern char *serverLogSyslogTag;
#endif
-extern void FSLog(const char *format, ...);
+extern void vFSLog(const char *format, va_list args);
+/*@printflike@*/ extern void FSLog(const char *format, ...);
#define ViceLog(level, str) if ((level) <= LogLevel) (FSLog str)
+#define vViceLog(level, str) if ((level) <= LogLevel) (vFSLog str)

extern int OpenLog(const char *filename);
extern int ReOpenLog(const char *fileName);
only in patch2:
unchanged:
--- src/util/serverLog.c 15 May 2003 16:27:59 -0000 1.18
+++ src/util/serverLog.c 29 May 2003 18:59:46 -0000
@@ -91,11 +91,8 @@
UNLOCK_SERVERLOG();
}

-/* VARARGS1 */
-void FSLog (const char *format, ...)
+void vFSLog (const char *format, va_list args)
{
- va_list args;
-
time_t currenttime;
char *timeStamp;
char tbuffer[1024];
@@ -114,9 +111,7 @@
info += strlen(info);
}

- va_start(args, format);
(void) vsprintf(info, format, args);
- va_end(args);

len = strlen(tbuffer);
LOCK_SERVERLOG();
@@ -135,7 +130,18 @@
fflush(stderr); /* in case they're sharing the same FD */
}
#endif
-}
+} /*vFSLog*/
+
+/* VARARGS1 */
+/*@printflike@*/
+void FSLog(const char *format, ...)
+{
+ va_list args;
+
+ va_start(args, format);
+ vFSLog(format, args);
+ va_end(args);
+} /*FSLog*/

static int DebugOn(int loglevel)
{
only in patch2:
unchanged:
--- src/vol/common.c 12 Jul 2001 19:59:32 -0000 1.4
+++ src/vol/common.c 29 May 2003 18:59:47 -0000
@@ -25,30 +25,38 @@

int Statistics = 0;

-/* VARARGS */
-Log (a,b,c,d,e,f,g,h,i,j,k)
- char *a, *b, *c, *d, *e, *f, *g, *h, *i, *j, *k;
+/*@printflike@*/ void Log(const char *format, ...)
{
- int level;
+ int level;
+ va_list args;

if (Statistics)
level = -1;
else
level = 0;
- ViceLog(level,(a,b,c,d,e,f,g,h,i,j,k));
+
+ va_start(args, format);
+ vViceLog(level, (format, args));
+ va_end(args);
}

-Abort(s,a,b,c,d,e,f,g,h,i,j)
- char *s, *a, *b, *c, *d, *e, *f, *g, *h, *i, *j;
+/*@printflike@*/ void Abort(const char *format, ...)
{
+ va_list args;
+
ViceLog(0, ("Program aborted: "));
- ViceLog(0, (s,a,b,c,d,e,f,g,h,i,j));
+ va_start(args, format);
+ vViceLog(0, (format, args));
+ va_end(args);
abort();
}

-Quit(s,a,b,c,d,e,f,g,h,i,j)
- char *s, *a, *b, *c, *d, *e, *f, *g, *h, *i, *j;
+/*@printflike@*/ void Quit(const char *format, ...)
{
- ViceLog(0, (s,a,b,c,d,e,f,g,h,i,j));
+ va_list args;
+
+ va_start(args, format);
+ vViceLog(0, (format, args));
+ va_end(args);
exit(1);
}
only in patch2:
unchanged:
--- src/vol/nuke.c 3 Mar 2003 15:10:38 -0000 1.8
+++ src/vol/nuke.c 29 May 2003 18:59:47 -0000
@@ -42,6 +42,8 @@
#include "salvage.h"
#include "fssync.h"

+/*@printflike@*/ extern void Log(const char *format, ...);
+

struct Lock localLock;
char *vol_DevName();
only in patch2:
unchanged:
--- src/vol/partition.c 28 Mar 2003 09:35:57 -0000 1.25
+++ src/vol/partition.c 29 May 2003 18:59:47 -0000
@@ -146,6 +146,8 @@
#include <jfs/filsys.h>
#endif

+/*@printflike@*/ extern void Log(const char *format, ...);
+
int aixlow_water = 8; /* default 8% */
struct DiskPartition *DiskPartitionList;

only in patch2:
unchanged:
--- src/volser/common.c 16 Oct 2002 03:59:29 -0000 1.7
+++ src/volser/common.c 29 May 2003 18:59:47 -0000
@@ -16,23 +16,28 @@
#include <afs/afsutil.h>
#include <afs/com_err.h>

-Log(a,b,c,d,e,f)
-char *a, *b, *c, *d, *e, *f;
+/*@printflike@*/ void Log(const char *format, ...)
{
- ViceLog(0, (a, b,c, d, e, f));
+ va_list args;
+
+ va_start(args, format);
+ vViceLog(0, (format, args));
+ va_end(args);
}

-LogError(errcode)
-afs_int32 errcode;
+void LogError(afs_int32 errcode)
{
ViceLog(0, ("%s: %s\n", error_table_name(errcode),error_message(errcode)));
}

-Abort(s,a,b,c,d,e,f,g,h,i,j)
-char *s;
+/*@printflike@*/ void Abort(const char* format, ...)
{
+ va_list args;
+
ViceLog(0, ("Program aborted: "));
- ViceLog(0, (s,a,b,c,d,e,f,g,h,i,j));
+ va_start(args, format);
+ vViceLog(0, (format, args));
+ va_end(args);
abort();
}

only in patch2:
unchanged:
--- src/volser/volmain.c 22 Aug 2002 18:45:20 -0000 1.11
+++ src/volser/volmain.c 29 May 2003 18:59:47 -0000
@@ -60,6 +60,9 @@
#include <afs/audit.h>
#include <afs/afsutil.h>

+/*@printflike@*/ extern void Log(const char* format, ...);
+/*@printflike@*/ extern void Abort(const char *format, ...);
+
#define VolserVersion "2.0"
#define N_SECURITY_OBJECTS 3

@@ -79,7 +82,6 @@
extern int (*VolFlushProc)();
extern void AFSVolExecuteRequest();
extern void RXSTATS_ExecuteRequest();
-extern Log();
struct afsconf_dir *tdir;
static afs_int32 runningCalls=0;
int DoLogging = 0;
only in patch2:
unchanged:
--- src/volser/voltrans.c 21 Aug 2002 18:14:34 -0000 1.6
+++ src/volser/voltrans.c 29 May 2003 18:59:48 -0000
@@ -36,6 +36,8 @@
#include <rx/rx.h>
#include "volser.h"

+/*@printflike@*/ extern void Log(const char *format, ...);
+
static struct volser_trans *allTrans=0;
static afs_int32 transCounter = 1;

Download rf2.diff
text/plain 16k

Message body not shown because it is too large.

Subject: Re: beginning resurrection of largefile support
Download (untitled)
text/plain 162b


logging-cleanup-20030602
start-splint-support-20030528
splint-fileserver-volserver-cleanup-20030602
largefile-2nd-try-base-work-20030602

all applied.
Date: Fri, 13 Jun 2003 18:58:00 -0400
From: "R. Lindsay Todd" <toddr@rpi.edu>
To: openafs-bugs@openafs.org
Subject: [grand.central.org #1493] Additional logging clean-ups
Download (untitled)
text/plain 850b
Attached is an additonal patch to improve logging. This modifies
src/util/vsnprintf.c to create an afs_vsnprintf and related set of
functions. The FSLog function is modified to use these. Various
sprintf's in src/viced, src/vol, and src/volser are also changed to use
these function.

A couple of new types, afs_intmax_t and afs_uintmax_t, are introduced.
These are 64bit if AFS_64BIT_ENV is defined; otherwise, they are 32
bit. The afs_vsnprintf will always correctly print them through the
"%lld" or "%llu" format. Some additional changes cast values to these
types and print through these formats. That vastly cleans up logging
when adding large file support!

Next patch I send along will actually deal directly with large file support.

[What is the preferred etiquette: Adding to an existing bug entry, or
starting a new one?]
Download afs_vsnprintf.diff
text/plain 70.5k

Message body not shown because it is too large.

Subject: Re: beginning resurrection of largefile support
Download (untitled)
text/plain 40b


Adding to an existing bug is fine.
Date: Wed, 25 Jun 2003 15:59:14 -0400
From: "R. Lindsay Todd" <toddr@rpi.edu>
To: openafs-bugs@openafs.org
Subject: [grand.central.org #1493] Splint helper script
Download (untitled)
text/plain 618b
Nathan suggested that rather than using lots of ".splintrc" files to
specify splint options, we use a helper script. These changes do that.

The "splint.cfg" and "helper-splint.sh.in" files need to reside in
openafs/src. The other changes will make sure the helper script is
edited at configure time, defines a HELPER_SPLINT autoconf variable, and
changes the 4 Makefiles that currently have splint targets to use this
variable. (That way if helper scripts someday reside in their own
directory, it will be straightforward to change Makefiles.)

Also, the target is now check-splint, instead of just splint.
Download splint.diff
text/plain 3k
--- acinclude.m4 19 Jun 2003 17:35:44 -0000 1.78
+++ acinclude.m4 25 Jun 2003 19:35:25 -0000
@@ -847,5 +847,10 @@
DEST="${SRCDIR_PARENT}/${AFS_SYSNAME}/dest"
fi

+HELPER_SPLINT="${TOP_SRCDIR}/helper-splint.sh"
+HELPER_SPLINTCFG="${TOP_SRCDIR}/splint.cfg"
+AC_SUBST(HELPER_SPLINT)
+AC_SUBST(HELPER_SPLINTCFG)
+

])
--- configure.in 16 Oct 2002 03:58:13 -0000 1.64
+++ configure.in 25 Jun 2003 19:35:25 -0000
@@ -123,4 +123,5 @@
src/volser/Makefile \
src/wsadmin.src/Makefile \
src/xstat/Makefile \
+src/helper-splint.sh \
)
--- src/util/Makefile.in 19 Jun 2003 17:35:49 -0000 1.21
+++ src/util/Makefile.in 25 Jun 2003 19:35:26 -0000
@@ -7,6 +7,8 @@

srcdir=@srcdir@
include @TOP_OBJDIR@/src/config/Makefile.config
+HELPER_SPLINT=@HELPER_SPLINT@
+

objects = assert.o base64.o casestrcpy.o ktime.o volparse.o hostparse.o \
hputil.o kreltime.o isathing.o get_krbrlm.o uuid.o serverLog.o \
@@ -369,8 +371,8 @@
${DEST}/lib/afs/libafsutil.a \
${DEST}/bin/sys

-splint:
- splint $(CFLAGS) \
+check-splint:
+ sh $(HELPER_SPLINT) $(CFLAGS) \
assert.c base64.c casestrcpy.c ktime.c volparse.c hostparse.c \
hputil.c kreltime.c isathing.c get_krbrlm.c uuid.c serverLog.c \
dirpath.c fileutil.c netutils.c flipbase64.c \
--- src/viced/Makefile.in 2 Jun 2003 14:35:59 -0000 1.10
+++ src/viced/Makefile.in 25 Jun 2003 19:35:26 -0000
@@ -7,6 +7,7 @@

srcdir=@srcdir@
include @TOP_OBJDIR@/src/config/Makefile.config
+HELPER_SPLINT=@HELPER_SPLINT@


CFLAGS=${DBG} ${OPTMZ} -I${TOP_OBJDIR}/src/config -I. -I${TOP_INCDIR} \
@@ -122,8 +123,8 @@

dest: ${DEST}/root.server/usr/afs/bin/fileserver ${DEST}/include/afs/fs_stats.h

-splint::
- splint $(CFLAGS) \
+check-splint::
+ sh $(HELPER_SPLINT) $(CFLAGS) \
viced.c \
afsfileprocs.c \
host.c \
--- src/vol/Makefile.in 19 Jun 2003 17:35:51 -0000 1.13
+++ src/vol/Makefile.in 25 Jun 2003 19:35:27 -0000
@@ -7,6 +7,8 @@

srcdir=@srcdir@
include @TOP_OBJDIR@/src/config/Makefile.config
+HELPER_SPLINT=@HELPER_SPLINT@
+

LIBS=${TOP_LIBDIR}/libcmd.a vlib.a ${TOP_LIBDIR}/util.a \
${TOP_LIBDIR}/libsys.a ${TOP_LIBDIR}/libdir.a \
@@ -280,8 +282,8 @@
${DEST}/include/afs/ihandle.h \
${DEST}/include/afs/namei_ops.h

-splint::
- splint $(CFLAGS) \
+check-splint::
+ sh $(HELPER_SPLINT) $(CFLAGS) \
vnode.c volume.c vutil.c partition.c fssync.c purge.c \
clone.c nuke.c devname.c listinodes.c common.c ihandle.c \
namei_ops.c \
--- src/volser/Makefile.in 19 Jun 2003 17:35:53 -0000 1.11
+++ src/volser/Makefile.in 25 Jun 2003 19:35:27 -0000
@@ -7,6 +7,8 @@

srcdir=@srcdir@
include @TOP_OBJDIR@/src/config/Makefile.config
+HELPER_SPLINT=@HELPER_SPLINT@
+

VINCLS=${TOP_INCDIR}/afs/partition.h ${TOP_INCDIR}/afs/volume.h \
${TOP_INCDIR}/afs/vlserver.h vol.h dump.h volser.h lockdata.h
@@ -179,8 +181,8 @@
${DEST}/lib/afs/libvolser.a


-splint::
- splint $(CFLAGS) \
+check-splint::
+ sh $(HELPER_SPLINT) $(CFLAGS) \
vos.c restorevol.c \
vsprocs.c vsutils.c lockprocs.c volerr.c \
volmain.c volprocs.c physio.c common.c voltrans.c \
Download splint.cfg
text/plain 402b
# We only attempt weak checking.
-weak
#
# We are not using namespaces the way splint wants, so don't check.
-name-checks
#
# Standard Unix library.
+unix-lib
#
# On RedHat Linux 9, /usr/include/asm/types.h uses __signed__ keyword.
-D__signed__=signed
#
# Stop complaining that sizes of array parameters are ignored.
-fixed-formal-array
#
# Flags to control checking integer usage.
+match-any-integral
#! /bin/sh

# Invoke "splint" with common options.
#
# This uses a common splint.cfg file. It will also look for a
# splint.cfg file in the current directory, using that instead, or a
# splint-append.cfg file, using that in addition to the common
# configuration.


TOP_SRCDIR=@TOP_SRCDIR@
HELPER_SPLINTCFG=@HELPER_SPLINTCFG@

cfargs="-f ${HELPER_SPLINTCFG}"
#
if [ -r splint-append.cfg ]; then
echo "Appending contents of splint-append.cfg to common splint options."
cfargs="$cfargs -f splint-append.cfg"
elif [ -r splint.cfg ]; then
echo "Overriding common splint options with splint.cfg"
cfargs="-f splint.cfg"
else
echo "No splint-append.cfg or splint.cfg, so using only common options."
fi
#
# Now run splint.
exec splint $cfargs -bad-flag "$@"
Subject: Re: beginning resurrection of largefile support
Download (untitled)
text/plain 36b

splint-support-20030701 committed.
Date: Tue, 22 Jul 2003 13:39:16 -0400
From: "R. Lindsay Todd" <toddr@rpi.edu>
To: openafs-bugs@openafs.org
Subject: [grand.central.org #1493] LFS Patch
Download (untitled)
text/plain 115b
Attached is the LFS patch, relative to the reindented CVS head, as
appeared in my LFS website for a few days now.
Download lfs.diff
text/plain 82.9k

Message body not shown because it is too large.

Subject: Re: beginning resurrection of largefile support
Download (untitled)
text/plain 169b
Applied as
large-file-support-20030808

after today's round of patches i'm going to be running some
tests over all of this, but it looks good from reading. Thanks.
Date: Tue, 12 Aug 2003 17:19:50 -0400
From: "R. Lindsay Todd" <toddr@rpi.edu>
To: openafs-bugs@openafs.org
Subject: [grand.central.org #1493] Configure script support for LFS
Download (untitled)
text/plain 446b
For completeness, here is the autoconf diffs needed to add an "--enable-largefile-fileserver" configure flag. I'm not really fussy about the flag name (--enable-lfs would be fine, for instance). This can be applied once you are comfortable with the LFS patch in legacy mode.

--
The views, opinions, and judgments expressed in this message are
solely those of the author. The message contents have not been
reviewed or approved by Rensselaer.
Download enable-lfs.diff
text/plain 1.3k
--- acconfig.h 15 Jul 2003 23:28:24 -0000 1.34
+++ acconfig.h 23 Jul 2003 21:56:49 -0000
@@ -18,6 +18,7 @@
# endif
#endif
#undef AFS_AFSDB_ENV
+#undef AFS_LARGEFILE_ENV
#undef AFS_NAMEI_ENV
#undef BITMAP_LATER
#undef BOS_RESTRICTED_MODE
--- acinclude.m4 10 Jul 2003 21:52:15 -0000 1.86
+++ acinclude.m4 23 Jul 2003 21:56:49 -0000
@@ -23,6 +23,8 @@
[ --enable-bos-restricted-mode enable bosserver restricted mode which disables certain bosserver functionality],, enable_bos_restricted_mode="no")
AC_ARG_ENABLE( bos-new-config,
[ --enable-bos-new-config enable bosserver pickup of BosConfig.new on restarts],, enable_bos_new_config="no")
+AC_ARG_ENABLE( largefile-fileserver,
+[ --enable-largefile-fileserver enable large file support in fileserver],, enable_largefile_fileserver="no")
AC_ARG_ENABLE( namei-fileserver,
[ --enable-namei-fileserver force compilation of namei fileserver in preference to inode fileserver],, enable_namei_fileserver="no")
AC_ARG_ENABLE( supergroups,
@@ -747,6 +749,10 @@

if test "$enable_bos_new_config" = "yes"; then
AC_DEFINE(BOS_NEW_CONFIG, 1, [define if you want to enable automatic renaming of BosConfig.new to BosConfig at startup])
+fi
+
+if test "$enable_largefile_fileserver" = "yes"; then
+ AC_DEFINE(AFS_LARGEFILE_ENV, 1, [define if you want large file fileserver])
fi

if test "$enable_namei_fileserver" = "yes"; then
Date: Thu, 21 Aug 2003 13:47:31 -0400
From: "R. Lindsay Todd" <toddr@rpi.edu>
To: openafs-bugs@openafs.org
Subject: Re: [grand.central.org #1493] Large file problems
Download (untitled)
text/plain 444b
After having sent along the autoconf patch to enable autoconf support, I
should note a couple of problems:

1) I can create a volume, but its root directory seems to be missing or
corrupt. The salvager fixes this. I am trying to trace down this problem.

2) I've had times when creating large files that the client reports that
the connection to the server has timed out. I suspect this is client
side, and haven't looked into it yet.
Date: Thu, 04 Sep 2003 15:48:25 -0400
From: "R. Lindsay Todd" <toddr@rpi.edu>
To: openafs-bugs@openafs.org
Subject: [grand.central.org #1493] Some fixes
Download (untitled)
text/plain 1.3k
The problem I reported with the client timing out seems to be really the result of an unstable clock on the PowerEdge 2600 I am using as a fileserver. The timeouts occur only when NTP loses syncronization; otherwise no problem.

I am still seeing problems with a corrupted volume root directory when a volume is created (and LFS enabled). Prototypes help in tracking this down, so I am contributing volprocs-proto.diff, which adds a lots of prototypes to the volser/volprocs.c source. One might instead choose to reorder the functions, avoiding many of the prototypes... Also, perhaps many of these functions could be static.

The restorevol.c code prints a file size with %d, clearly wrong. The attached restorevol-fix.diff patch will repair that.

The attached .cvsignore file should go into the "src" directory; it will eliminate CVS messages about the helper-splint.sh script.

I plan to try adding prototypes to the dir/buffer code, probably creating a buffer.h header file. This is to help track down what is causing corruption in the volume root directory. I already have started using splint on this code, but will wait until I have firmer results to send a patch.

--
The views, opinions, and judgments expressed in this message are
solely those of the author. The message contents have not been
reviewed or approved by Rensselaer.
Download volprocs-proto.diff
text/plain 26.9k

Message body not shown because it is too large.

--- src/volser/restorevol.c 8 Aug 2003 20:40:47 -0000 1.12
+++ src/volser/restorevol.c 4 Sep 2003 19:10:15 -0000
@@ -147,7 +147,8 @@
if (code < 0)
fprintf(stderr, "Code = %d; Errno = %d\n", code, errno);
else
- fprintf(stderr, "Read %d bytes out of %d\n", code, size);
+ fprintf(stderr, "Read %d bytes out of %lld\n", code,
+ (afs_uintmax_t) size);
}
if ((code >= 0) && (code < BUFSIZE))
buffer[size] = 0; /* Add null char at end */
Download .cvsignore
text/plain 17b
helper-splint.sh
Subject: Re: beginning resurrection of largefile support
Download (untitled)
text/plain 191b
[Non-text message not quoted]

This somehow never got committed. Applied
largefile-support-continued-20031205

volprocs prototyping doesn't apply but i will try to get it ported forward.
Subject: Re: beginning resurrection of largefile support
Download (untitled)
text/plain 128b
[Non-text message not quoted]
Fix for the corrupted volume problem committed.
volser-salvagedirhandle-fix-arg-order-20031209
Subject: Re: beginning resurrection of largefile support
Download (untitled)
text/plain 142b

Fix for an assert which could cause a DoS if a position read started beyond
EOF:

fs-return-EIO-when-starting-read-beyond-EOF-20040202