@@ -854,7 +854,7 @@ main(int argc, char **argv)
}
} else {
char *lb[XFS_MAX_SECTORSIZE] = { NULL };
- off64_t off;
+ off_t off;
/* ensure device files are sufficiently large */
@@ -1214,7 +1214,7 @@ packfile(char *fname, char *tname, int fd,
struct dioattr dio;
static xfs_swapext_t sx;
struct xfs_flock64 space;
- off64_t cnt, pos;
+ off_t cnt, pos;
void *fbuf = NULL;
int ct, wc, wc_b4;
char ffname[SMBUFSZ];
@@ -53,9 +53,9 @@ bmap_help(void)
static int
numlen(
- off64_t val)
+ off_t val)
{
- off64_t tmp;
+ off_t tmp;
int len;
for (len = 0, tmp = val; tmp > 0; tmp = tmp/10)
@@ -279,7 +279,7 @@ bmap_f(
#define FLG_BSW 000010 /* Not on begin of stripe width */
#define FLG_ESW 000001 /* Not on end of stripe width */
int agno;
- off64_t agoff, bbperag;
+ off_t agoff, bbperag;
int foff_w, boff_w, aoff_w, tot_w, agno_w;
char rbuf[32], bbuf[32], abuf[32];
int sunit, swidth;
@@ -289,8 +289,8 @@ bmap_f(
if (is_rt)
sunit = swidth = bbperag = 0;
else {
- bbperag = (off64_t)fsgeo.agblocks *
- (off64_t)fsgeo.blocksize / BBSIZE;
+ bbperag = (off_t)fsgeo.agblocks *
+ (off_t)fsgeo.blocksize / BBSIZE;
sunit = (fsgeo.sunit * fsgeo.blocksize) / BBSIZE;
swidth = (fsgeo.swidth * fsgeo.blocksize) / BBSIZE;
}
@@ -57,7 +57,7 @@ copy_file_range(int fd, loff_t *src, loff_t *dst, size_t len)
return 0;
}
-static off64_t
+static off_t
copy_src_filesize(int fd)
{
struct stat st;
@@ -51,7 +51,7 @@ fadvise_f(
int argc,
char **argv)
{
- off64_t offset = 0, length = 0;
+ off_t offset = 0, length = 0;
int c, range = 0, advise = POSIX_FADV_NORMAL;
while ((c = getopt(argc, argv, "dnrsw")) != EOF) {
@@ -60,7 +60,7 @@ extern int filelist_f(void);
typedef struct mmap_region {
void *addr; /* address of start of mapping */
size_t length; /* length of mapping */
- off64_t offset; /* start offset into backing file */
+ off_t offset; /* start offset into backing file */
int prot; /* protection mode of the mapping */
char *name; /* name of backing file */
} mmap_region_t;
@@ -69,13 +69,13 @@ extern mmap_region_t *maptable; /* mmap'd region array */
extern int mapcount; /* #entries in the mapping table */
extern mmap_region_t *mapping; /* active mapping table entry */
extern int maplist_f(void);
-extern void *check_mapping_range(mmap_region_t *, off64_t, size_t, int);
+extern void *check_mapping_range(mmap_region_t *, off_t, size_t, int);
/*
* Various xfs_io helper routines/globals
*/
-extern off64_t filesize(void);
+extern off_t filesize(void);
extern int openfile(char *, xfs_fsop_geom_t *, int, mode_t);
extern int addfile(char *, int , xfs_fsop_geom_t *, int);
extern void printxattr(uint, int, int, const char *, int, int);
@@ -88,9 +88,9 @@ extern size_t buffersize;
extern int vectors;
extern struct iovec *iov;
extern int alloc_buffer(size_t, int, unsigned int);
-extern int read_buffer(int, off64_t, long long, long long *,
+extern int read_buffer(int, off_t, long long, long long *,
int, int);
-extern void dump_buffer(off64_t, ssize_t);
+extern void dump_buffer(off_t, ssize_t);
extern void attr_init(void);
extern void bmap_init(void);
@@ -51,7 +51,7 @@ madvise_f(
int argc,
char **argv)
{
- off64_t offset, llength;
+ off_t offset, llength;
size_t length;
void *start;
int advise = MADV_NORMAL, c;
@@ -29,7 +29,7 @@ mincore_f(
int argc,
char **argv)
{
- off64_t offset, llength;
+ off_t offset, llength;
size_t length;
size_t blocksize, sectsize;
void *start;
@@ -68,11 +68,11 @@ print_mapping(
void *
check_mapping_range(
mmap_region_t *map,
- off64_t offset,
+ off_t offset,
size_t length,
int pagealign)
{
- off64_t relative;
+ off_t relative;
if (offset < mapping->offset) {
printf(_("offset (%lld) is before start of mapping (%lld)\n"),
@@ -156,7 +156,7 @@ mmap_f(
int argc,
char **argv)
{
- off64_t offset;
+ off_t offset;
ssize_t length = 0, length2 = 0;
void *address = NULL;
char *filename;
@@ -288,7 +288,7 @@ msync_f(
int argc,
char **argv)
{
- off64_t offset;
+ off_t offset;
ssize_t length;
void *start;
int c, flags = 0;
@@ -372,7 +372,7 @@ mread_f(
int argc,
char **argv)
{
- off64_t offset, tmp, dumpoffset, printoffset;
+ off_t offset, tmp, dumpoffset, printoffset;
ssize_t length;
size_t dumplen, cnt = 0;
char *bp;
@@ -529,7 +529,7 @@ mwrite_f(
int argc,
char **argv)
{
- off64_t offset, tmp;
+ off_t offset, tmp;
ssize_t length;
void *start;
char *sp;
@@ -49,7 +49,7 @@ static cmdinfo_t inode_cmd;
static prid_t prid;
static long extsize;
-off64_t
+off_t
filesize(void)
{
struct stat st;
@@ -125,7 +125,7 @@ alloc_buffer(
void
__dump_buffer(
void *buf,
- off64_t offset,
+ off_t offset,
ssize_t len)
{
int i, j;
@@ -150,7 +150,7 @@ __dump_buffer(
void
dump_buffer(
- off64_t offset,
+ off_t offset,
ssize_t len)
{
int i, l;
@@ -173,7 +173,7 @@ dump_buffer(
static int
do_preadv(
int fd,
- off64_t offset,
+ off_t offset,
ssize_t count,
ssize_t buffer_size)
{
@@ -209,7 +209,7 @@ do_preadv(
static int
do_pread(
int fd,
- off64_t offset,
+ off_t offset,
ssize_t count,
ssize_t buffer_size)
{
@@ -222,13 +222,13 @@ do_pread(
static int
read_random(
int fd,
- off64_t offset,
+ off_t offset,
long long count,
long long *total,
unsigned int seed,
int eof)
{
- off64_t end, off, range;
+ off_t end, off, range;
ssize_t bytes;
int ops = 0;
@@ -269,12 +269,12 @@ read_random(
static int
read_backward(
int fd,
- off64_t *offset,
+ off_t *offset,
long long *count,
long long *total,
int eof)
{
- off64_t end, off = *offset;
+ off_t end, off = *offset;
ssize_t bytes = 0, bytes_requested;
long long cnt = *count;
int ops = 0;
@@ -329,7 +329,7 @@ read_backward(
static int
read_forward(
int fd,
- off64_t offset,
+ off_t offset,
long long count,
long long *total,
int verbose,
@@ -363,7 +363,7 @@ read_forward(
int
read_buffer(
int fd,
- off64_t offset,
+ off_t offset,
long long count,
long long *total,
int verbose,
@@ -378,7 +378,7 @@ pread_f(
char **argv)
{
size_t bsize;
- off64_t offset;
+ off_t offset;
unsigned int zeed = 0;
long long count, total, tmp;
size_t fsblocksize, fssectsize;
@@ -60,7 +60,7 @@ pwrite_help(void)
static int
do_pwritev(
int fd,
- off64_t offset,
+ off_t offset,
ssize_t count,
ssize_t buffer_size)
{
@@ -96,7 +96,7 @@ do_pwritev(
static int
do_pwrite(
int fd,
- off64_t offset,
+ off_t offset,
ssize_t count,
ssize_t buffer_size)
{
@@ -108,12 +108,12 @@ do_pwrite(
static int
write_random(
- off64_t offset,
+ off_t offset,
long long count,
unsigned int seed,
long long *total)
{
- off64_t off, range;
+ off_t off, range;
ssize_t bytes;
int ops = 0;
@@ -151,11 +151,11 @@ write_random(
static int
write_backward(
- off64_t offset,
+ off_t offset,
long long *count,
long long *total)
{
- off64_t end, off = offset;
+ off_t end, off = offset;
ssize_t bytes = 0, bytes_requested;
long long cnt = *count;
int ops = 0;
@@ -207,11 +207,11 @@ write_backward(
static int
write_buffer(
- off64_t offset,
+ off_t offset,
long long count,
size_t bs,
int fd,
- off64_t skip,
+ off_t skip,
long long *total)
{
ssize_t bytes;
@@ -249,7 +249,7 @@ pwrite_f(
char **argv)
{
size_t bsize;
- off64_t offset, skip = 0;
+ off_t offset, skip = 0;
long long count, total, tmp;
unsigned int zeed = 0, seed = 0xcdcdcdcd;
size_t fsblocksize, fssectsize;
@@ -109,7 +109,7 @@ dedupe_f(
int argc,
char **argv)
{
- off64_t soffset, doffset;
+ off_t soffset, doffset;
long long count, total;
char *infile;
int condensed, quiet_flag;
@@ -229,7 +229,7 @@ reflink_f(
int argc,
char **argv)
{
- off64_t soffset, doffset;
+ off_t soffset, doffset;
long long count = 0, total;
char *infile = NULL;
int condensed, quiet_flag;
@@ -75,8 +75,8 @@ void
seek_output(
int startflag,
char *type,
- off64_t start,
- off64_t offset)
+ off_t start,
+ off_t offset)
{
if (offset == -1) {
if (errno == ENXIO) {
@@ -104,7 +104,7 @@ seek_f(
int argc,
char **argv)
{
- off64_t offset, start;
+ off_t offset, start;
size_t fsblocksize, fssectsize;
int c;
int current; /* specify data or hole */
@@ -45,12 +45,12 @@ sendfile_help(void)
static int
send_buffer(
- off64_t offset,
+ off_t offset,
size_t count,
int fd,
long long *total)
{
- off64_t off = offset;
+ off_t off = offset;
ssize_t bytes, bytes_remaining = count;
int ops = 0;
@@ -77,7 +77,7 @@ sendfile_f(
int argc,
char **argv)
{
- off64_t offset = 0;
+ off_t offset = 0;
long long count, total;
size_t blocksize, sectsize;
struct timeval t1, t2;
@@ -42,7 +42,7 @@ sync_range_f(
int argc,
char **argv)
{
- off64_t offset = 0, length = 0;
+ off_t offset = 0, length = 0;
int c, sync_mode = 0;
size_t blocksize, sectsize;
@@ -28,7 +28,7 @@ truncate_f(
int argc,
char **argv)
{
- off64_t offset;
+ off_t offset;
size_t blocksize, sectsize;
init_cvtnum(&blocksize, §size);
@@ -911,7 +911,7 @@ libxfs_balloc(cache_key_t key)
static int
-__read_buf(int fd, void *buf, int len, off64_t offset, int flags)
+__read_buf(int fd, void *buf, int len, off_t offset, int flags)
{
int sts;
@@ -1024,7 +1024,7 @@ libxfs_readbufr_map(struct xfs_buftarg *btp, struct xfs_buf *bp, int flags)
fd = libxfs_device_to_fd(btp->dev);
buf = bp->b_addr;
for (i = 0; i < bp->b_nmaps; i++) {
- off64_t offset = LIBXFS_BBTOOFF64(bp->b_map[i].bm_bn);
+ off_t offset = LIBXFS_BBTOOFF64(bp->b_map[i].bm_bn);
int len = BBTOB(bp->b_map[i].bm_len);
error = __read_buf(fd, buf, len, offset, flags);
@@ -1079,7 +1079,7 @@ libxfs_readbuf_map(struct xfs_buftarg *btp, struct xfs_buf_map *map, int nmaps,
}
static int
-__write_buf(int fd, void *buf, int len, off64_t offset, int flags)
+__write_buf(int fd, void *buf, int len, off_t offset, int flags)
{
int sts;
@@ -1142,7 +1142,7 @@ libxfs_writebufr(xfs_buf_t *bp)
char *buf = bp->b_addr;
for (i = 0; i < bp->b_nmaps; i++) {
- off64_t offset = LIBXFS_BBTOOFF64(bp->b_map[i].bm_bn);
+ off_t offset = LIBXFS_BBTOOFF64(bp->b_map[i].bm_bn);
int len = BBTOB(bp->b_map[i].bm_len);
bp->b_error = __write_buf(fd, buf, len, offset,
@@ -131,7 +131,7 @@ perform_restore(
/* ensure device is sufficiently large enough */
char *lb[XFS_MAX_SECTORSIZE] = { NULL };
- off64_t off;
+ off_t off;
off = sb.sb_dblocks * sb.sb_blocksize - sizeof(lb);
if (pwrite(dst_fd, lb, sizeof(lb), off) < 0)
@@ -465,7 +465,7 @@ pf_batch_read(
{
xfs_buf_t *bplist[MAX_BUFS];
unsigned int num;
- off64_t first_off, last_off, next_off;
+ off_t first_off, last_off, next_off;
int len, size;
int i;
int inode_bufs;
Signed-off-by: Felix Janda <felix.janda@posteo.de> --- copy/xfs_copy.c | 2 +- fsr/xfs_fsr.c | 2 +- io/bmap.c | 10 +++++----- io/copy_file_range.c | 2 +- io/fadvise.c | 2 +- io/io.h | 10 +++++----- io/madvise.c | 2 +- io/mincore.c | 2 +- io/mmap.c | 12 ++++++------ io/open.c | 2 +- io/pread.c | 22 +++++++++++----------- io/pwrite.c | 18 +++++++++--------- io/reflink.c | 4 ++-- io/seek.c | 6 +++--- io/sendfile.c | 6 +++--- io/sync_file_range.c | 2 +- io/truncate.c | 2 +- libxfs/rdwr.c | 8 ++++---- mdrestore/xfs_mdrestore.c | 2 +- repair/prefetch.c | 2 +- 20 files changed, 59 insertions(+), 59 deletions(-)