Merge of master-melb:xfs-cmds:24375a by kenmcd.
38 files changed:
enum {
DEFAULT_TIME = 0x0,
TERSE_FIXED_TIME = 0x1,
enum {
DEFAULT_TIME = 0x0,
TERSE_FIXED_TIME = 0x1,
- VERBOSE_FIXED_TIME = 0x2,
+ VERBOSE_FIXED_TIME = 0x2
};
extern void timestr(struct timeval *tv, char *str, size_t sz, int flags);
};
extern void timestr(struct timeval *tv, char *str, size_t sz, int flags);
#ifndef __GNUC__
#define __sgi__ __sgi
#define __inline__ __inline
#ifndef __GNUC__
#define __sgi__ __sgi
#define __inline__ __inline
#endif
#define constpp char * const *
#endif
#define constpp char * const *
#ifndef __PATH_H__
#define __PATH_H__
#ifndef __PATH_H__
#define __PATH_H__
/*
* XFS Filesystem Paths
/*
* XFS Filesystem Paths
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <xfs/command.h>
#include <xfs/input.h>
#include "init.h"
#include <xfs/command.h>
#include <xfs/input.h>
#include "init.h"
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <xfs/command.h>
#include "init.h"
#include "io.h"
#include <xfs/command.h>
#include "init.h"
#include "io.h"
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <xfs/command.h>
#include <xfs/input.h>
#include "init.h"
#include <xfs/command.h>
#include <xfs/input.h>
#include "init.h"
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <xfs/command.h>
#include <xfs/input.h>
#include <sys/mman.h>
#include <xfs/command.h>
#include <xfs/input.h>
#include <sys/mman.h>
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <xfs/command.h>
#include <xfs/input.h>
#include "init.h"
#include <xfs/command.h>
#include <xfs/input.h>
#include "init.h"
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <xfs/command.h>
#include "init.h"
#include "io.h"
#include <xfs/command.h>
#include "init.h"
#include "io.h"
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <xfs/command.h>
#include <xfs/input.h>
#include <sys/time.h>
#include <xfs/command.h>
#include <xfs/input.h>
#include <sys/time.h>
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <xfs/command.h>
#include <xfs/input.h>
#include "init.h"
#include <xfs/command.h>
#include <xfs/input.h>
#include "init.h"
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <xfs/command.h>
#include <xfs/input.h>
#include "init.h"
#include <xfs/command.h>
#include <xfs/input.h>
#include "init.h"
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <xfs/command.h>
#include <xfs/input.h>
#include "init.h"
#include <xfs/command.h>
#include <xfs/input.h>
#include "init.h"
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <xfs/command.h>
#include <xfs/input.h>
#include <sys/mman.h>
#include <xfs/command.h>
#include <xfs/input.h>
#include <sys/mman.h>
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <xfs/command.h>
#include <xfs/input.h>
#include <sys/mman.h>
#include <xfs/command.h>
#include <xfs/input.h>
#include <sys/mman.h>
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <xfs/command.h>
#include <xfs/input.h>
#include <sys/mman.h>
#include <xfs/command.h>
#include <xfs/input.h>
#include <sys/mman.h>
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <xfs/command.h>
#include <xfs/input.h>
#include "init.h"
#include <xfs/command.h>
#include <xfs/input.h>
#include "init.h"
progname, path, strerror(errno));
} else {
if (getprojid(path, fd, &projid) == 0)
progname, path, strerror(errno));
} else {
if (getprojid(path, fd, &projid) == 0)
- printf("[%u] %s\n", projid, path);
+ printf("[%u] %s\n", (unsigned int)projid, path);
else if (getprojid(file->name, file->fd, &projid) < 0)
perror("getprojid");
else
else if (getprojid(file->name, file->fd, &projid) < 0)
perror("getprojid");
else
- printf(_("projid = %u\n"), projid);
+ printf(_("projid = %u\n"), (unsigned int)projid);
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <xfs/command.h>
#include <xfs/input.h>
#include <ctype.h>
#include <xfs/command.h>
#include <xfs/input.h>
#include <ctype.h>
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <xfs/command.h>
#include <xfs/input.h>
#include "init.h"
#include <xfs/command.h>
#include <xfs/input.h>
#include "init.h"
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <xfs/command.h>
#include <xfs/input.h>
#include "init.h"
#include <xfs/command.h>
#include <xfs/input.h>
#include "init.h"
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <xfs/command.h>
#include <xfs/input.h>
#include "init.h"
#include <xfs/command.h>
#include <xfs/input.h>
#include "init.h"
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <xfs/command.h>
#include <xfs/input.h>
#include <sys/sendfile.h>
#include <xfs/command.h>
#include <xfs/input.h>
#include <sys/sendfile.h>
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <xfs/command.h>
#include <xfs/input.h>
#include "init.h"
#include <xfs/command.h>
#include <xfs/input.h>
#include "init.h"
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <xfs/command.h>
#include <xfs/input.h>
#include "init.h"
#include <xfs/command.h>
#include <xfs/input.h>
#include "init.h"
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <xfs/libxfs.h>
-
-/* attributes.h (purposefully) unavailable to xfsprogs, make do */
-struct attrlist_cursor { __u32 opaque[4]; };
-
#include <xfs/handle.h>
/* just pick a value we know is more than big enough */
#include <xfs/handle.h>
/* just pick a value we know is more than big enough */
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <xfs/libxfs.h>
-
-/* attributes.h (purposefully) unavailable to xfsprogs, make do */
-struct attrlist_cursor { __u32 opaque[4]; };
-
#include <xfs/handle.h>
#include <xfs/jdm.h>
#include <xfs/handle.h>
#include <xfs/jdm.h>
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <xfs/command.h>
#include <xfs/input.h>
#include <xfs/command.h>
#include <xfs/input.h>
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <xfs/command.h>
static cmdinfo_t help_cmd;
#include <xfs/command.h>
static cmdinfo_t help_cmd;
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <xfs/input.h>
#if defined(ENABLE_READLINE)
#include <xfs/input.h>
#if defined(ENABLE_READLINE)
# include <histedit.h>
#endif
# include <histedit.h>
#endif
+extern char *progname;
+
static char *
get_prompt(void)
{
static char *
get_prompt(void)
{
- prid = strtoul(project, &sp, 10);
+ prid = (prid_t)strtoul(project, &sp, 10);
if (sp != project)
return prid;
prj = getprnam(project);
if (sp != project)
return prid;
prj = getprnam(project);
- uid = strtoul(user, &sp, 10);
+ uid = (uid_t)strtoul(user, &sp, 10);
if (sp != user)
return uid;
pwd = getpwnam(user);
if (sp != user)
return uid;
pwd = getpwnam(user);
- gid = strtoul(group, &sp, 10);
+ gid = (gid_t)strtoul(group, &sp, 10);
if (sp != group)
return gid;
grp = getgrnam(group);
if (sp != group)
return gid;
grp = getgrnam(group);
#include <xfs/input.h>
#include <xfs/project.h>
#include <xfs/input.h>
#include <xfs/project.h>
+extern char *progname;
+
int fs_count;
struct fs_path *fs_table;
struct fs_path *fs_path;
int fs_count;
struct fs_path *fs_table;
struct fs_path *fs_path;
char **logp,
char **rtp)
{
char **logp,
char **rtp)
{
- char *fslog, *fsrt, *fslogend, *fsrtend;
-
- fslog = fsrt = fslogend = fsrtend = NULL;
/* Extract log device and realtime device from mount options */
if ((fslog = hasmntopt(mnt, "logdev=")))
/* Extract log device and realtime device from mount options */
if ((fslog = hasmntopt(mnt, "logdev=")))
/* Do this only after we've finished processing mount options */
if (fslog) {
/* Do this only after we've finished processing mount options */
if (fslog) {
- fslogend = strtok(fslog, " ,");
fslog = strdup(fslog);
}
if (fsrt) {
fslog = strdup(fslog);
}
if (fsrt) {
- fsrtend = strtok(fsrt, " ,");
if (!projects)
return NULL;
if (!projects)
return NULL;
if (!fgets(projects_buffer, size, projects))
break;
/*
if (!fgets(projects_buffer, size, projects))
break;
/*
p.pr_prid = atoi(idstart+1);
p.pr_name = &projects_buffer[0];
return &p;
p.pr_prid = atoi(idstart+1);
p.pr_name = &projects_buffer[0];
return &p;
if (!project_paths)
return NULL;
if (!project_paths)
return NULL;
if (!fgets(project_paths_buffer, size, project_paths))
break;
/*
if (!fgets(project_paths_buffer, size, project_paths))
break;
/*
pp.pp_pathname = nmstart + 1;
pp.pp_prid = atoi(&project_paths_buffer[0]);
return &pp;
pp.pp_pathname = nmstart + 1;
pp.pp_prid = atoi(&project_paths_buffer[0]);
return &pp;
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <xfs/command.h>
static cmdinfo_t quit_cmd;
#include <xfs/command.h>
static cmdinfo_t quit_cmd;
static int
quit_f(
int argc,
static int
quit_f(
int argc,
\f3xfs_io\f1 [ \f3\-c\f1 cmd ] ... [ \f3\-p\f1 prog ] [ \f3\-adFfmrRstx\f1 ] file
.fi
.SH DESCRIPTION
\f3xfs_io\f1 [ \f3\-c\f1 cmd ] ... [ \f3\-p\f1 prog ] [ \f3\-adFfmrRstx\f1 ] file
.fi
.SH DESCRIPTION
-\f2xfs_io\f1 is a debugging tool like \f2xfs_db\f1(8), but is aimed
+\f2xfs_io\f1 is a debugging tool like \f2xfs_db\f1, but is aimed
at examining the regular file I/O path rather than the raw XFS volume
itself.
.PP
at examining the regular file I/O path rather than the raw XFS volume
itself.
.PP
.TP
\f3bmap\f1 [ \f2\-adlpv\f1 ] [ \f2\-n nx\f1 ]
Prints the block mapping for the current open file.
.TP
\f3bmap\f1 [ \f2\-adlpv\f1 ] [ \f2\-n nx\f1 ]
Prints the block mapping for the current open file.
-Refer to \f2xfs_bmap\f1(8) for complete documentation.
+Refer to the \f2xfs_bmap\f1 manual page for complete documentation.
.TP
\f3allocsp\f1 \f2offset\f1 \f2length\f1
Allocates zeroed space for part of a file using the XFS_IOC_ALLOCSP
.TP
\f3allocsp\f1 \f2offset\f1 \f2length\f1
Allocates zeroed space for part of a file using the XFS_IOC_ALLOCSP
-system call described in \f2xfs\f1(5).
+system call described in the \f2xfs\f1 manual page.
.TP
\f3freesp\f1 \f2offset\f1 \f2length\f1
Frees space for part of a file using the XFS_IOC_FREESP
.TP
\f3freesp\f1 \f2offset\f1 \f2length\f1
Frees space for part of a file using the XFS_IOC_FREESP
-system call described in \f2xfs\f1(5).
+system call described in the \f2xfs\f1 manual page.
.TP
\f3fadvise\f1 [ \f2\-dnrsw\f1 ]
On platforms which support it, allows hints be given to the system
.TP
\f3fadvise\f1 [ \f2\-dnrsw\f1 ]
On platforms which support it, allows hints be given to the system
.TP
\f3resvsp\f1 \f2offset\f1 \f2length\f1
Allocates reserved, unwritten space for part of a file using the XFS_IOC_RESVSP
.TP
\f3resvsp\f1 \f2offset\f1 \f2length\f1
Allocates reserved, unwritten space for part of a file using the XFS_IOC_RESVSP
-system call described in \f2xfs\f1(5).
+system call described in the \f2xfs\f1 manual page.
.TP
\f3unresvsp\f1 \f2offset\f1 \f2length\f1
Frees reserved space for part of a file using the XFS_IOC_UNRESVSP
.TP
\f3unresvsp\f1 \f2offset\f1 \f2length\f1
Frees reserved space for part of a file using the XFS_IOC_UNRESVSP
-system call described in \f2xfs\f1(5).
+system call described in the \f2xfs\f1 manual page.
.TP
\f3truncate\f1 \f2offset\f1
Truncates the current file at the given offset using \f2ftruncate\f1(2).
.TP
\f3truncate\f1 \f2offset\f1
Truncates the current file at the given offset using \f2ftruncate\f1(2).
.TP
\f3resblks\f1 [ \f2blocks\f1 ]
Get and/or set count of reserved filesystem blocks using the
.TP
\f3resblks\f1 [ \f2blocks\f1 ]
Get and/or set count of reserved filesystem blocks using the
-XFS_IOC_GET_RESBLKS or XFS_IOC_SET_RESBLKS system calls,
-as described in \f2xfs\f1(5).
+XFS_IOC_GET_RESBLKS or XFS_IOC_SET_RESBLKS system calls.
Note \-\- this can be useful for exercising out of space behavior.
Only available in expert mode and requires privileges.
.TP
Note \-\- this can be useful for exercising out of space behavior.
Only available in expert mode and requires privileges.
.TP
.TP
\f3stat\f1 [ \f2\-v\f1 ]
Selected statistics from \f2stat\f1(2) and the XFS_IOC_GETXATTR
.TP
\f3stat\f1 [ \f2\-v\f1 ]
Selected statistics from \f2stat\f1(2) and the XFS_IOC_GETXATTR
-system call from \f2xfs\f1(5) on the current file.
+system call on the current file.
If the \f2-v\f1 option is specified, the atime (last access), mtime
(last modify), and ctime (last change) timestamps are also displayed.
.TP
\f3statfs\f1
Selected statistics from \f2statfs\f1(2) and the XFS_IOC_FSGEOMETRY
If the \f2-v\f1 option is specified, the atime (last access), mtime
(last modify), and ctime (last change) timestamps are also displayed.
.TP
\f3statfs\f1
Selected statistics from \f2statfs\f1(2) and the XFS_IOC_FSGEOMETRY
-system call from \f2xfs\f1(5) on the filesystem where the current
-file resides.
+system call on the filesystem where the current file resides.
+
+.SH IRIX SEE ALSO
+mkfs_xfs(1M),
+syssgi(2),
+xfs_bmap(1M),
+xfs_db(1M),
+xfs(4).
+
+.SH LINUX SEE ALSO
+mkfs.xfs(8),
+xfsctl(3),
+xfs_bmap(8),
+xfs_db(8),
+xfs(5).
.SH SEE ALSO
fdatasync(2),
.SH SEE ALSO
fdatasync(2),
fstatfs(2),
fsync(2),
ftruncate(2),
fstatfs(2),
fsync(2),
ftruncate(2),
mmap(2),
open(2),
pread(2),
mmap(2),
open(2),
pread(2),
-pwrite(2),
-xfs_bmap(8),
-xfs_db(8),
-xfs(5).
As such, it is administered differently, in particular:
.TP
1.
As such, it is administered differently, in particular:
.TP
1.
-.BR quotacheck (8)
-has no effect on XFS filesystems.
+The
+.B quotacheck
+command has no effect on XFS filesystems.
The first time quota accounting is turned on (at mount time), XFS does
an automatic quotacheck internally; afterwards, the quota system will
always be completely consistent until quotas are manually turned off.
The first time quota accounting is turned on (at mount time), XFS does
an automatic quotacheck internally; afterwards, the quota system will
always be completely consistent until quotas are manually turned off.
However, it is possible to turn on/off limit enforcement any time
quota accounting is turned on.
The "quota" option to the
However, it is possible to turn on/off limit enforcement any time
quota accounting is turned on.
The "quota" option to the
command turns on both (user) quota accounting and enforcement.
The "uqnoenforce" option must be used to turn on user accounting with
limit enforcement disabled.
command turns on both (user) quota accounting and enforcement.
The "uqnoenforce" option must be used to turn on user accounting with
limit enforcement disabled.
Turning on quotas on the root filesystem is slightly different from
the above.
For IRIX XFS, refer to
Turning on quotas on the root filesystem is slightly different from
the above.
For IRIX XFS, refer to
For Linux XFS, the quota mount flags must be passed in with the
"rootflags=" boot parameter.
.TP
For Linux XFS, the quota mount flags must be passed in with the
"rootflags=" boot parameter.
.TP
.TP
6.
There is a mechanism built into
.TP
6.
There is a mechanism built into
that allows quota limit information to be backed up for later
restoration, should the need arise.
.TP
that allows quota limit information to be backed up for later
restoration, should the need arise.
.TP
.BR /etc/projid
Mapping of numeric project identifiers to project names.
.PD
.BR /etc/projid
Mapping of numeric project identifiers to project names.
.PD
+.SH IRIX SEE ALSO
+quotaon(1M),
+xfs(4).
+
+.SH LINUX SEE ALSO
+warnquota(8),
+xfs(5).
+
.SH SEE ALSO
df(1),
mount(1),
sync(2),
.SH SEE ALSO
df(1),
mount(1),
sync(2),
if (fsx.fsx_projid != prid)
printf(_("%s - project identifier is not set"
" (inode=%u, tree=%u)\n"),
if (fsx.fsx_projid != prid)
printf(_("%s - project identifier is not set"
" (inode=%u, tree=%u)\n"),
- path, fsx.fsx_projid, prid);
+ path, fsx.fsx_projid, (unsigned int)prid);
if (!(fsx.fsx_xflags & XFS_XFLAG_PROJINHERIT))
printf(_("%s - project inheritance flag is not set\n"),
path);
if (!(fsx.fsx_xflags & XFS_XFLAG_PROJINHERIT))
printf(_("%s - project inheritance flag is not set\n"),
path);
if ((p = getprprid(prid)))
return p->pr_name;
if ((p = getprprid(prid)))
return p->pr_name;
- snprintf(buffer, sizeof(buffer), "#%u", prid);
+ snprintf(buffer, sizeof(buffer), "#%u", (unsigned int)prid);
setprent();
while ((p = getprent()) != NULL) {
if (flags & NO_LOOKUP_FLAG)
setprent();
while ((p = getprent()) != NULL) {
if (flags & NO_LOOKUP_FLAG)
- snprintf(n, sizeof(n)-1, "#%u", p->pr_prid);
+ snprintf(n, sizeof(n)-1, "#%u",
+ (unsigned int)p->pr_prid);
else
strncpy(n, p->pr_name, sizeof(n)-1);
if (report_mount(fp, p->pr_prid, n,
else
strncpy(n, p->pr_name, sizeof(n)-1);
if (report_mount(fp, p->pr_prid, n,
#include <pwd.h>
#include <grp.h>
#include <utmp.h>
#include <pwd.h>
#include <grp.h>
#include <utmp.h>
#include "quota.h"
#define SECONDS_IN_A_DAY (24 * 60 * 60)
#include "quota.h"
#define SECONDS_IN_A_DAY (24 * 60 * 60)