-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlustre-format.patch
148 lines (134 loc) · 5.42 KB
/
lustre-format.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
--- lustre-release-cac870c/lustre/utils/lfs.c.orig 2023-12-23 04:15:24.000000000 +0100
+++ lustre-release-cac870c/lustre/utils/lfs.c 2024-05-20 18:17:43.426251832 +0200
@@ -2699,7 +2699,7 @@ new_comp:
rc = llapi_layout_comp_extent_set(layout, prev_end,
comp_end);
if (rc) {
- fprintf(stderr, "Set extent [%lu, %lu) failed. %s\n",
+ fprintf(stderr, "Set extent [%"PRIu64", %"PRIu64") failed. %s\n",
prev_end, comp_end, strerror(errno));
return rc;
}
@@ -2786,7 +2786,7 @@ new_comp:
rc = llapi_layout_stripe_size_set(layout, size);
if (rc) {
- fprintf(stderr, "Set stripe size %lu failed: %s\n",
+ fprintf(stderr, "Set stripe size %"PRIu64" failed: %s\n",
size, strerror(errno));
return rc;
}
@@ -3232,7 +3232,7 @@ static int layout_adjust_first_extent(ch
if (start > prev_end || end < prev_end) {
fprintf(stderr,
- "%s setstripe: first extent [%lu, %lu) not adjacent with extent end %lu\n",
+ "%s setstripe: first extent [%"PRIu64", %"PRIu64") not adjacent with extent end %"PRIu64"\n",
progname, start, end, prev_end);
return -EINVAL;
}
@@ -3240,7 +3240,7 @@ static int layout_adjust_first_extent(ch
rc = llapi_layout_comp_extent_set(layout, prev_end, end);
if (rc) {
fprintf(stderr,
- "%s setstripe: cannot set component extent [%lu, %lu): %s\n",
+ "%s setstripe: cannot set component extent [%"PRIu64", %"PRIu64"): %s\n",
progname, prev_end, end, strerror(errno));
return rc;
}
@@ -11085,7 +11085,7 @@ static inline int lfs_mirror_read(int ar
if (written != bytes_read) {
fprintf(stderr,
- "%s %s: written %ld bytes does not match with %ld read.\n",
+ "%s %s: written %zd bytes does not match with %zd read.\n",
progname, argv[0], written, bytes_read);
rc = -EIO;
goto free_buf;
--- lustre-release-cac870c/lustre/utils/llsom_sync.c.orig 2023-12-23 04:15:24.000000000 +0100
+++ lustre-release-cac870c/lustre/utils/llsom_sync.c 2024-05-20 18:30:09.526728906 +0200
@@ -272,10 +272,10 @@ static int lsom_update_one(struct fid_re
llapi_printf(LLAPI_MSG_DEBUG,
"record %llu:%llu, updated LSOM for fid " DFID
- " size:%lu blocks:%lu\n",
+ " size:%llu blocks:%llu\n",
(unsigned long long)f->fr_time,
(unsigned long long)f->fr_index,
- PFID(&f->fr_fid), st.st_size, st.st_blocks);
+ PFID(&f->fr_fid), (unsigned long long)st.st_size, (unsigned long long)st.st_blocks);
clean_up:
rc = llapi_changelog_clear(opt.o_mdtname,
--- lustre-release-cac870c/lustre/utils/lhsmtool_posix.c.orig 2023-12-23 04:15:24.000000000 +0100
+++ lustre-release-cac870c/lustre/utils/lhsmtool_posix.c 2024-05-20 18:37:39.159967695 +0200
@@ -2014,7 +2014,7 @@ static int ct_archive_upgrade_dir(int ar
}
while ((d = readdir(dir)) != NULL) {
- CT_TRACE("archive upgrade found %s '%s' (%ld)\n",
+ CT_TRACE("archive upgrade found %s '%s' (%"PRId64")\n",
d_type_name(d->d_type), d->d_name, d->d_ino);
switch (d->d_type) {
@@ -2031,12 +2031,12 @@ static int ct_archive_upgrade_dir(int ar
dirfd(dir), d->d_name);
if (rc2 < 0) {
rc = rc2;
- CT_ERROR(rc, "cannot upgrade dir '%s' (%ld)",
+ CT_ERROR(rc, "cannot upgrade dir '%s' (%"PRId64")",
d->d_name, d->d_ino);
}
rc2 = unlinkat(dirfd(dir), d->d_name, AT_REMOVEDIR);
- CT_TRACE("unlink dir '%s' (%ld): %s",
+ CT_TRACE("unlink dir '%s' (%"PRId64"): %s",
d->d_name, d->d_ino, strerror(rc2 < 0 ? errno: 0));
if (rc2 < 0 && errno != ENOTEMPTY)
rc = -errno;
@@ -2051,7 +2051,7 @@ static int ct_archive_upgrade_dir(int ar
break;
default:
ignore:
- CT_TRACE("ignoring unexpected %s '%s' (%ld) in archive",
+ CT_TRACE("ignoring unexpected %s '%s' (%"PRId64") in archive",
d_type_name(d->d_type), d->d_name, d->d_ino);
break;
}
--- lustre-release-cac870c/lustre/tests/lockahead_test.c.orig 2023-12-23 04:15:24.000000000 +0100
+++ lustre-release-cac870c/lustre/tests/lockahead_test.c 2024-05-20 18:45:26.591009301 +0200
@@ -40,6 +40,7 @@
#include <unistd.h>
#include <poll.h>
#include <time.h>
+#include <inttypes.h>
#include <lustre/lustreapi.h>
#include <linux/lustre/lustre_idl.h>
@@ -1182,10 +1183,10 @@ static int test23(void)
mainpath2, strerror(errno));
ASSERTF(sb.st_size == sb2.st_size,
- "size on %s and %s differs: %lu vs %lu",
+ "size on %s and %s differs: %"PRIu64" vs %"PRIu64,
mainpath, mainpath2, sb.st_size, sb2.st_size);
- ASSERTF(sb.st_size == write_size, "size %lu != bytes written (%lu)",
+ ASSERTF(sb.st_size == write_size, "size %"PRIu64" != bytes written (%zu)",
sb.st_size, write_size);
close(fd);
--- lustre-release-cac870c/lustre/tests/expand_truncate_test.c.orig 2023-12-23 04:15:24.000000000 +0100
+++ lustre-release-cac870c/lustre/tests/expand_truncate_test.c 2024-05-20 18:49:47.303013091 +0200
@@ -1,6 +1,7 @@
#include <stdio.h>
#include <unistd.h>
#include <errno.h>
+#include <inttypes.h>
#include <sys/file.h>
int main(int argc, char **argv)
@@ -24,7 +25,7 @@ int main(int argc, char **argv)
off = 1021 * 1024 * 1024;
if (ftruncate(fd, off) < 0) {
- fprintf(stderr, "ftruncate %ld failed:%d\n", off, errno);
+ fprintf(stderr, "ftruncate %"PRId64" failed:%d\n", (int64_t)off, errno);
rc = -1;
goto close;
}
@@ -32,7 +33,7 @@ int main(int argc, char **argv)
off -= 4;
off = lseek(fd, off, SEEK_SET);
if (off == (off_t)-1) {
- fprintf(stderr, "lseek %ld failed:%d\n", off, errno);
+ fprintf(stderr, "lseek %"PRId64" failed:%d\n", (int64_t)off, errno);
rc = -1;
goto close;
}