1 |
mabi 07/10/05 14:03:14 |
2 |
|
3 |
Added: pvfs2-client-init.d 2.6.3-no-pointer-sign.patch |
4 |
2.6.3-as-needed.patch digest-pvfs2-2.6.3 |
5 |
2.6.3-soname.patch 2.6.3-kmem-and-dtor-fix.patch |
6 |
2.6.3-link-librt-properly.patch |
7 |
2.6.3-register_sysctl_table.patch pvfs2-server.conf |
8 |
pvfs2-server.rc pvfs2-client.conf |
9 |
Log: |
10 |
revbump + cvs backport of kmem fix |
11 |
(Portage version: 2.1.3.11) |
12 |
|
13 |
Revision Changes Path |
14 |
1.1 sys-cluster/pvfs2/files/pvfs2-client-init.d |
15 |
|
16 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-cluster/pvfs2/files/pvfs2-client-init.d?rev=1.1&view=markup |
17 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-cluster/pvfs2/files/pvfs2-client-init.d?rev=1.1&content-type=text/plain |
18 |
|
19 |
Index: pvfs2-client-init.d |
20 |
=================================================================== |
21 |
#!/sbin/runscript |
22 |
# Copyright 1999-2007 Gentoo Foundation |
23 |
# Distributed under the terms of the GNU General Public License v2 |
24 |
# $Header: /var/cvsroot/gentoo-x86/sys-cluster/pvfs2/files/pvfs2-client-init.d,v 1.1 2007/10/05 14:03:13 mabi Exp $ |
25 |
|
26 |
|
27 |
depend() { |
28 |
need net |
29 |
need localmount |
30 |
before pbs_mom |
31 |
after pvfs2-server |
32 |
} |
33 |
|
34 |
checkconfig() { |
35 |
if [ ! -x "${PVFS2_CLIENT}" ] || [ ! -x "${PVFS2_CLIENT_CORE}" ]; then |
36 |
eend 1 "pvfs-2 was not correctly installed." |
37 |
return 1 |
38 |
fi |
39 |
|
40 |
if [ ! -d "${PVFS2_MOUNTPOINT}" ]; then |
41 |
ewarn "Creating ${PVFS2_MOUNTPOINT}" |
42 |
mkdir -p ${PVFS2_MOUNTPOINT} || return 1 |
43 |
fi |
44 |
|
45 |
local piddir=$(dirname ${PVFS2_CLIENT_PIDFILE}) |
46 |
if [ ! -d "${piddir}" ]; then |
47 |
ewarn "Creating ${piddir}" |
48 |
mkdir -p ${piddir} || return 1 |
49 |
fi |
50 |
|
51 |
return 0 |
52 |
} |
53 |
|
54 |
start() { |
55 |
ebegin "Starting pvfs2-client" |
56 |
local rc=0 |
57 |
|
58 |
$(lsmod | egrep "^pvfs2 " &> /dev/null) || modprobe pvfs2 |
59 |
if [[ $? -ne 0 ]]; then |
60 |
eend 1 "Failed to load the pvfs2 module" |
61 |
return 1 |
62 |
fi |
63 |
|
64 |
# -f so start-stop-daemon can snag the pid. |
65 |
start-stop-daemon --start -q -b -m -p ${PVFS2_CLIENT_PIDFILE} \ |
66 |
--exec ${PVFS2_CLIENT} -- -f -p ${PVFS2_CLIENT_CORE} ${PVFS2_CLIENT_ARGS} |
67 |
rc=$? |
68 |
|
69 |
if [[ $rc -ne 0 ]]; then |
70 |
eend ${rc} "Failed to run pvfs2-client" |
71 |
return ${rc} |
72 |
fi |
73 |
|
74 |
mount -t pvfs2 tcp://${PVFS2_SERVER_HOST}:3334/pvfs2-fs "${PVFS2_MOUNTPOINT}" |
75 |
rc=$? |
76 |
if [[ $rc -ne 0 ]]; then |
77 |
eend 1 "Failed to mount the pvfs2 filesystem on ${PVFS2_MOUNTPOINT}" |
78 |
return 1 |
79 |
fi |
80 |
|
81 |
eend ${rc} |
82 |
} |
83 |
|
84 |
stop() { |
85 |
ebegin "Stopping pvfs2-client" |
86 |
if [ -n "$(mount | awk '{print $3}' | grep ${PVFS2_MOUNTPOINT})" ]; then |
87 |
umount -f ${PVFS2_MOUNTPOINT} |
88 |
fi |
89 |
|
90 |
start-stop-daemon --stop -p ${PVFS2_CLIENT_PIDFILE} |
91 |
|
92 |
modprobe -r pvfs2 |
93 |
|
94 |
eend $? |
95 |
} |
96 |
|
97 |
|
98 |
|
99 |
|
100 |
1.1 sys-cluster/pvfs2/files/2.6.3-no-pointer-sign.patch |
101 |
|
102 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-cluster/pvfs2/files/2.6.3-no-pointer-sign.patch?rev=1.1&view=markup |
103 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-cluster/pvfs2/files/2.6.3-no-pointer-sign.patch?rev=1.1&content-type=text/plain |
104 |
|
105 |
Index: 2.6.3-no-pointer-sign.patch |
106 |
=================================================================== |
107 |
--- maint/config/kernel.m4.old 2007-04-30 16:46:16.000000000 +0200 |
108 |
+++ maint/config/kernel.m4 2007-04-30 16:48:26.000000000 +0200 |
109 |
@@ -348,11 +348,8 @@ |
110 |
) |
111 |
fi |
112 |
|
113 |
- dnl we need the compiler to error on warnings about prototypes, but |
114 |
- dnl certain Fedora FC5 kernel header files throw extra (spurious) |
115 |
- dnl warnings, which -Wno-pointer-sign silences. |
116 |
+ |
117 |
tmp_cflags=$CFLAGS |
118 |
- CFLAGS="$CFLAGS -Werror -Wno-pointer-sign" |
119 |
dnl if this test passes, there is a struct dentry* argument |
120 |
AC_MSG_CHECKING(if statfs callbacks' arguments in kernel has struct dentry argument) |
121 |
dnl if this test passes, the kernel has it |
122 |
|
123 |
|
124 |
|
125 |
1.1 sys-cluster/pvfs2/files/2.6.3-as-needed.patch |
126 |
|
127 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-cluster/pvfs2/files/2.6.3-as-needed.patch?rev=1.1&view=markup |
128 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-cluster/pvfs2/files/2.6.3-as-needed.patch?rev=1.1&content-type=text/plain |
129 |
|
130 |
Index: 2.6.3-as-needed.patch |
131 |
=================================================================== |
132 |
--- maint/config/openssl.m4~ 2007-04-16 04:17:53.000000000 +0200 |
133 |
+++ maint/config/openssl.m4 2007-04-16 04:17:53.000000000 +0200 |
134 |
@@ -12,7 +12,7 @@ |
135 |
LDFLAGS="$LDFLAGS -L${opensslpath}/lib64 -L${opensslpath}/lib" |
136 |
SERVER_LDFLAGS="$SERVER_LDFLAGS -L${opensslpath}/lib64 -L${opensslpath}/lib" |
137 |
fi |
138 |
- LIBS="$LIBS -lcrypt -lssl" |
139 |
+ LIBS="$LIBS -lcrypt -lcrypto -lssl" |
140 |
|
141 |
AC_COMPILE_IFELSE( |
142 |
[#include "openssl/bio.h"], |
143 |
@@ -36,7 +36,7 @@ |
144 |
[ |
145 |
AC_MSG_CHECKING([for openssl library]) |
146 |
TMPLIBS=${LIBS} |
147 |
- LIBS="$LIBS -lcrypt -lssl" |
148 |
+ LIBS="$LIBS -lcrypt -lcrypto -lssl" |
149 |
|
150 |
AC_COMPILE_IFELSE( |
151 |
[#include "openssl/bio.h"], |
152 |
|
153 |
|
154 |
|
155 |
1.1 sys-cluster/pvfs2/files/digest-pvfs2-2.6.3 |
156 |
|
157 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-cluster/pvfs2/files/digest-pvfs2-2.6.3?rev=1.1&view=markup |
158 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-cluster/pvfs2/files/digest-pvfs2-2.6.3?rev=1.1&content-type=text/plain |
159 |
|
160 |
Index: digest-pvfs2-2.6.3 |
161 |
=================================================================== |
162 |
MD5 f7ba22bb0b4bdaadb69ca1c2d8e102a4 pvfs-2.6.3.tar.gz 3971014 |
163 |
RMD160 a2dcfcf60bde46a3f99b1cc490e9148fdbaacda6 pvfs-2.6.3.tar.gz 3971014 |
164 |
SHA256 e8468c277b8832ef26308400a41244fad6e98f38ffcfd417b42aae9f796c03f6 pvfs-2.6.3.tar.gz 3971014 |
165 |
|
166 |
|
167 |
|
168 |
1.1 sys-cluster/pvfs2/files/2.6.3-soname.patch |
169 |
|
170 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-cluster/pvfs2/files/2.6.3-soname.patch?rev=1.1&view=markup |
171 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-cluster/pvfs2/files/2.6.3-soname.patch?rev=1.1&content-type=text/plain |
172 |
|
173 |
Index: 2.6.3-soname.patch |
174 |
=================================================================== |
175 |
--- Makefile.in 2007-04-15 11:11:51.000000000 +0200 |
176 |
+++ Makefile.in 2007-04-15 11:11:51.000000000 +0200 |
177 |
@@ -591,7 +591,7 @@ |
178 |
lib/libpvfs2.so: $(LIBPICOBJS) |
179 |
$(Q) " LDSO $@" |
180 |
$(E)$(INSTALL) -d lib |
181 |
- $(E)$(LDSHARED) -o $@ $(LIBPICOBJS) |
182 |
+ $(E)$(LDSHARED) -Wl,-soname,libpvfs2.so -o $@ $(LIBPICOBJS) |
183 |
|
184 |
# rule for building the pvfs2 _multithreaded_ library |
185 |
lib/libpvfs2-threaded.so: $(LIBTHREADEDPICOBJS) |
186 |
|
187 |
|
188 |
|
189 |
1.1 sys-cluster/pvfs2/files/2.6.3-kmem-and-dtor-fix.patch |
190 |
|
191 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-cluster/pvfs2/files/2.6.3-kmem-and-dtor-fix.patch?rev=1.1&view=markup |
192 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-cluster/pvfs2/files/2.6.3-kmem-and-dtor-fix.patch?rev=1.1&content-type=text/plain |
193 |
|
194 |
Index: 2.6.3-kmem-and-dtor-fix.patch |
195 |
=================================================================== |
196 |
diff -u -r pvfs-2.6.3/src/kernel/linux-2.6/pvfs2-cache.c pvfs-2.6.3-new/src/kernel/linux-2.6/pvfs2-cache.c |
197 |
--- pvfs-2.6.3/src/kernel/linux-2.6/pvfs2-cache.c 2007-10-02 14:54:45.000000000 +0200 |
198 |
+++ pvfs-2.6.3-new/src/kernel/linux-2.6/pvfs2-cache.c 2007-10-02 14:49:10.000000000 +0200 |
199 |
@@ -203,14 +203,7 @@ |
200 |
pvfs2_kmem_cache_t * cachep, |
201 |
unsigned long flags) |
202 |
{ |
203 |
- if (flags & SLAB_CTOR_CONSTRUCTOR) |
204 |
- { |
205 |
- memset(req, 0, sizeof(MAX_ALIGNED_DEV_REQ_DOWNSIZE)); |
206 |
- } |
207 |
- else |
208 |
- { |
209 |
- gossip_err("WARNING!! devreq_ctor called without ctor flag\n"); |
210 |
- } |
211 |
+ memset(req, 0, sizeof(MAX_ALIGNED_DEV_REQ_DOWNSIZE)); |
212 |
} |
213 |
|
214 |
int dev_req_cache_initialize(void) |
215 |
@@ -269,45 +262,24 @@ |
216 |
{ |
217 |
pvfs2_inode_t *pvfs2_inode = (pvfs2_inode_t *)new_pvfs2_inode; |
218 |
|
219 |
- if (flags & SLAB_CTOR_CONSTRUCTOR) |
220 |
- { |
221 |
- memset(pvfs2_inode, 0, sizeof(pvfs2_inode_t)); |
222 |
- ClearInitFlag(pvfs2_inode); |
223 |
+ memset(pvfs2_inode, 0, sizeof(pvfs2_inode_t)); |
224 |
+ ClearInitFlag(pvfs2_inode); |
225 |
|
226 |
- pvfs2_inode_initialize(pvfs2_inode); |
227 |
+ pvfs2_inode_initialize(pvfs2_inode); |
228 |
|
229 |
#ifndef PVFS2_LINUX_KERNEL_2_4 |
230 |
- /* |
231 |
- inode_init_once is from 2.6.x's inode.c; it's normally run |
232 |
- when an inode is allocated by the system's inode slab |
233 |
- allocator. we call it here since we're overloading the |
234 |
- system's inode allocation with this routine, thus we have |
235 |
- to init vfs inodes manually |
236 |
- */ |
237 |
- inode_init_once(&pvfs2_inode->vfs_inode); |
238 |
- pvfs2_inode->vfs_inode.i_version = 1; |
239 |
+ /* |
240 |
+ inode_init_once is from 2.6.x's inode.c; it's normally run |
241 |
+ when an inode is allocated by the system's inode slab |
242 |
+ allocator. we call it here since we're overloading the |
243 |
+ system's inode allocation with this routine, thus we have |
244 |
+ to init vfs inodes manually |
245 |
+ */ |
246 |
+ inode_init_once(&pvfs2_inode->vfs_inode); |
247 |
+ pvfs2_inode->vfs_inode.i_version = 1; |
248 |
#endif |
249 |
- /* Initialize the reader/writer semaphore */ |
250 |
- init_rwsem(&pvfs2_inode->xattr_sem); |
251 |
- } |
252 |
- else |
253 |
- { |
254 |
- gossip_err("WARNING!! inode_ctor called without ctor flag\n"); |
255 |
- } |
256 |
-} |
257 |
- |
258 |
-static void pvfs2_inode_cache_dtor( |
259 |
- void *old_pvfs2_inode, |
260 |
- pvfs2_kmem_cache_t * cachep, |
261 |
- unsigned long flags) |
262 |
-{ |
263 |
- pvfs2_inode_t *pvfs2_inode = (pvfs2_inode_t *)old_pvfs2_inode; |
264 |
- |
265 |
- if (pvfs2_inode && pvfs2_inode->link_target) |
266 |
- { |
267 |
- kfree(pvfs2_inode->link_target); |
268 |
- pvfs2_inode->link_target = NULL; |
269 |
- } |
270 |
+ /* Initialize the reader/writer semaphore */ |
271 |
+ init_rwsem(&pvfs2_inode->xattr_sem); |
272 |
} |
273 |
|
274 |
static inline void add_to_pinode_list(pvfs2_inode_t *pvfs2_inode) |
275 |
@@ -330,8 +302,7 @@ |
276 |
{ |
277 |
pvfs2_inode_cache = kmem_cache_create( |
278 |
"pvfs2_inode_cache", sizeof(pvfs2_inode_t), 0, |
279 |
- PVFS2_CACHE_CREATE_FLAGS, pvfs2_inode_cache_ctor, |
280 |
- pvfs2_inode_cache_dtor); |
281 |
+ PVFS2_CACHE_CREATE_FLAGS, pvfs2_inode_cache_ctor, NULL); |
282 |
|
283 |
if (!pvfs2_inode_cache) |
284 |
{ |
285 |
@@ -403,14 +374,7 @@ |
286 |
pvfs2_kmem_cache_t * cachep, |
287 |
unsigned long flags) |
288 |
{ |
289 |
- if (flags & SLAB_CTOR_CONSTRUCTOR) |
290 |
- { |
291 |
- memset(req, 0, sizeof(pvfs2_kiocb)); |
292 |
- } |
293 |
- else |
294 |
- { |
295 |
- gossip_err("WARNING!! kiocb_ctor called without ctor flag\n"); |
296 |
- } |
297 |
+ memset(req, 0, sizeof(pvfs2_kiocb)); |
298 |
} |
299 |
|
300 |
|
301 |
diff -u -r pvfs-2.6.3/src/kernel/linux-2.6/pvfs2-kernel.h pvfs-2.6.3-new/src/kernel/linux-2.6/pvfs2-kernel.h |
302 |
--- pvfs-2.6.3/src/kernel/linux-2.6/pvfs2-kernel.h 2007-10-02 14:54:45.000000000 +0200 |
303 |
+++ pvfs-2.6.3-new/src/kernel/linux-2.6/pvfs2-kernel.h 2007-10-02 14:49:10.000000000 +0200 |
304 |
@@ -47,6 +47,7 @@ |
305 |
#include <linux/statfs.h> |
306 |
#include <linux/buffer_head.h> |
307 |
#include <linux/backing-dev.h> |
308 |
+#include <linux/device.h> |
309 |
#include <linux/mpage.h> |
310 |
#include <linux/namei.h> |
311 |
#include <linux/errno.h> |
312 |
@@ -363,7 +364,7 @@ |
313 |
typedef struct |
314 |
{ |
315 |
PVFS_object_ref refn; |
316 |
- char *link_target; |
317 |
+ char link_target[PVFS_NAME_MAX]; |
318 |
/* |
319 |
* Reading/Writing Extended attributes need to acquire the appropriate |
320 |
* reader/writer semaphore on the pvfs2_inode_t structure. |
321 |
@@ -571,6 +572,15 @@ |
322 |
|
323 |
#endif |
324 |
|
325 |
+typedef struct pvfs2_stats { |
326 |
+ unsigned long cache_hits; |
327 |
+ unsigned long cache_misses; |
328 |
+ unsigned long reads; |
329 |
+ unsigned long writes; |
330 |
+} pvfs2_stats; |
331 |
+ |
332 |
+extern pvfs2_stats g_pvfs2_stats; |
333 |
+ |
334 |
/* |
335 |
NOTE: See Documentation/filesystems/porting for information |
336 |
on implementing FOO_I and properly accessing fs private data |
337 |
@@ -821,8 +831,8 @@ |
338 |
* defined in devpvfs2-req.c |
339 |
****************************/ |
340 |
|
341 |
-int pvfs2_ioctl32_init(void); |
342 |
-void pvfs2_ioctl32_cleanup(void); |
343 |
+int pvfs2_dev_init(void); |
344 |
+void pvfs2_dev_cleanup(void); |
345 |
int is_daemon_in_service(void); |
346 |
int fs_mount_pending(PVFS_fs_id fsid); |
347 |
|
348 |
@@ -1250,6 +1260,18 @@ |
349 |
} |
350 |
#endif |
351 |
|
352 |
+#ifndef HAVE_KZALLOC |
353 |
+static void *kzalloc(size_t size, gfp_t mask) |
354 |
+{ |
355 |
+ void *ptr; |
356 |
+ ptr = kmalloc(size, mask); |
357 |
+ if (ptr) { |
358 |
+ memset(ptr, 0, size); |
359 |
+ } |
360 |
+ return ptr; |
361 |
+} |
362 |
+#endif |
363 |
+ |
364 |
#endif /* PVFS2_LINUX_KERNEL_2_4 */ |
365 |
|
366 |
static inline unsigned int diff(struct timeval *end, struct timeval *begin) |
367 |
@@ -1268,11 +1290,10 @@ |
368 |
void * ptr; |
369 |
|
370 |
ptr = kmalloc(size, flags); |
371 |
- if(!ptr) |
372 |
+ if (ptr) |
373 |
{ |
374 |
- return ptr; |
375 |
+ memset(ptr, 0, size); |
376 |
} |
377 |
- memset(ptr, 0, size); |
378 |
return ptr; |
379 |
} |
380 |
#endif |
381 |
diff -u -r pvfs-2.6.3/src/kernel/linux-2.6/pvfs2-utils.c pvfs-2.6.3-new/src/kernel/linux-2.6/pvfs2-utils.c |
382 |
--- pvfs-2.6.3/src/kernel/linux-2.6/pvfs2-utils.c 2007-10-02 14:54:45.000000000 +0200 |
383 |
+++ pvfs-2.6.3-new/src/kernel/linux-2.6/pvfs2-utils.c 2007-10-02 15:04:12.000000000 +0200 |
384 |
@@ -101,18 +101,24 @@ |
385 |
static void pvfs2_set_inode_flags(struct inode *inode, |
386 |
PVFS_sys_attr *attrs) |
387 |
{ |
388 |
- if (attrs->flags & PVFS_IMMUTABLE_FL) |
389 |
+ if (attrs->flags & PVFS_IMMUTABLE_FL) { |
390 |
inode->i_flags |= S_IMMUTABLE; |
391 |
- else |
392 |
+ } |
393 |
+ else { |
394 |
inode->i_flags &= ~S_IMMUTABLE; |
395 |
- if (attrs->flags & PVFS_APPEND_FL) |
396 |
+ } |
397 |
+ if (attrs->flags & PVFS_APPEND_FL) { |
398 |
inode->i_flags |= S_APPEND; |
399 |
- else |
400 |
+ } |
401 |
+ else { |
402 |
inode->i_flags &= ~S_APPEND; |
403 |
- if (attrs->flags & PVFS_NOATIME_FL) |
404 |
+ } |
405 |
+ if (attrs->flags & PVFS_NOATIME_FL) { |
406 |
inode->i_flags |= S_NOATIME; |
407 |
- else |
408 |
+ } |
409 |
+ else { |
410 |
inode->i_flags &= ~S_NOATIME; |
411 |
+ } |
412 |
return; |
413 |
} |
414 |
|
415 |
@@ -288,17 +294,7 @@ |
416 |
/* copy link target to inode private data */ |
417 |
if (pvfs2_inode && symname) |
418 |
{ |
419 |
- if (pvfs2_inode->link_target) |
420 |
- { |
421 |
- kfree(pvfs2_inode->link_target); |
422 |
- pvfs2_inode->link_target = NULL; |
423 |
- } |
424 |
- pvfs2_inode->link_target = kmalloc( |
425 |
- (strlen(symname) + 1), PVFS2_GFP_FLAGS); |
426 |
- if (pvfs2_inode->link_target) |
427 |
- { |
428 |
- strcpy(pvfs2_inode->link_target, symname); |
429 |
- } |
430 |
+ strncpy(pvfs2_inode->link_target, symname, PVFS_NAME_MAX); |
431 |
gossip_debug(GOSSIP_UTILS_DEBUG, "Copied attr link target %s\n", |
432 |
pvfs2_inode->link_target); |
433 |
} |
434 |
@@ -1791,7 +1787,8 @@ |
435 |
{ |
436 |
void *buf; |
437 |
|
438 |
- buf = kmalloc(sizeof(pvfs2_opaque_handle_t), PVFS2_BUFMAP_GFP_FLAGS); |
439 |
+ buf = kmalloc(sizeof(pvfs2_opaque_handle_t), |
440 |
+ PVFS2_BUFMAP_GFP_FLAGS); |
441 |
return buf; |
442 |
} |
443 |
|
444 |
@@ -1956,7 +1953,7 @@ |
445 |
pvfs2_inode->refn.handle = PVFS_HANDLE_NULL; |
446 |
pvfs2_inode->refn.fs_id = PVFS_FS_ID_NULL; |
447 |
pvfs2_inode->last_failed_block_index_read = 0; |
448 |
- pvfs2_inode->link_target = NULL; |
449 |
+ memset(pvfs2_inode->link_target, 0, sizeof(pvfs2_inode->link_target)); |
450 |
pvfs2_inode->error_code = 0; |
451 |
SetInitFlag(pvfs2_inode); |
452 |
} |
453 |
@@ -1964,7 +1961,6 @@ |
454 |
|
455 |
/* |
456 |
this is called from super:pvfs2_destroy_inode. |
457 |
- pvfs2_inode_cache_dtor frees the link_target if any |
458 |
*/ |
459 |
void pvfs2_inode_finalize(pvfs2_inode_t *pvfs2_inode) |
460 |
{ |
461 |
|
462 |
|
463 |
|
464 |
1.1 sys-cluster/pvfs2/files/2.6.3-link-librt-properly.patch |
465 |
|
466 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-cluster/pvfs2/files/2.6.3-link-librt-properly.patch?rev=1.1&view=markup |
467 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-cluster/pvfs2/files/2.6.3-link-librt-properly.patch?rev=1.1&content-type=text/plain |
468 |
|
469 |
Index: 2.6.3-link-librt-properly.patch |
470 |
=================================================================== |
471 |
diff -urN pvfs-2.6.0.orig/maint/config/rt.m4 pvfs-2.6.0/maint/config/rt.m4 |
472 |
--- pvfs-2.6.0.orig/maint/config/rt.m4 2006-12-10 23:16:47.000000000 -0800 |
473 |
+++ pvfs-2.6.0/maint/config/rt.m4 2006-12-10 23:36:17.000000000 -0800 |
474 |
@@ -12,7 +12,7 @@ |
475 |
[lio_listio(LIO_NOWAIT, NULL, 0, NULL);], |
476 |
[AC_MSG_RESULT(no)], |
477 |
[ |
478 |
- LDFLAGS="$LDFLAGS -lrt" |
479 |
+ LIBS="$LIBS -lrt" |
480 |
AC_TRY_LINK( |
481 |
[#include <stdlib.h> |
482 |
#include <unistd.h> |
483 |
|
484 |
|
485 |
|
486 |
1.1 sys-cluster/pvfs2/files/2.6.3-register_sysctl_table.patch |
487 |
|
488 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-cluster/pvfs2/files/2.6.3-register_sysctl_table.patch?rev=1.1&view=markup |
489 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-cluster/pvfs2/files/2.6.3-register_sysctl_table.patch?rev=1.1&content-type=text/plain |
490 |
|
491 |
Index: 2.6.3-register_sysctl_table.patch |
492 |
=================================================================== |
493 |
--- src/kernel/linux-2.6/pvfs2-proc.c.old 2007-04-30 10:02:55.000000000 +0200 |
494 |
+++ src/kernel/linux-2.6/pvfs2-proc.c 2007-04-30 10:01:50.000000000 +0200 |
495 |
@@ -337,7 +337,7 @@ |
496 |
#ifdef CONFIG_SYSCTL |
497 |
if (!fs_table_header) |
498 |
{ |
499 |
- fs_table_header = register_sysctl_table(fs_table, 0); |
500 |
+ fs_table_header = register_sysctl_table(fs_table); |
501 |
} |
502 |
#endif |
503 |
|
504 |
|
505 |
|
506 |
|
507 |
1.1 sys-cluster/pvfs2/files/pvfs2-server.conf |
508 |
|
509 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-cluster/pvfs2/files/pvfs2-server.conf?rev=1.1&view=markup |
510 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-cluster/pvfs2/files/pvfs2-server.conf?rev=1.1&content-type=text/plain |
511 |
|
512 |
Index: pvfs2-server.conf |
513 |
=================================================================== |
514 |
# The three following variables set where pvfs2 will find the fs and server |
515 |
# configuration files. If you don't set anything, these default to |
516 |
# ${PVFS2_CONF_PATH}/pvfs2-<server/fs>.conf |
517 |
PVFS2_FS_CONF="" |
518 |
|
519 |
# You can set either of the following. If PVFS2_SERVER_CONF is set, we |
520 |
# look for that exact config file. If PVFS2_SERVER_CONF_BASE is set, |
521 |
# we look for ${PVFS2_SERVER_CONF_BASE}-$(hostname -s). The latter |
522 |
# is useful when distributing an image across multiple machines. When |
523 |
# both are defined, preference is given to the the latter. |
524 |
PVFS2_SERVER_CONF="" |
525 |
PVFS2_SERVER_CONF_BASE="" |
526 |
|
527 |
|
528 |
# your server binary, default is shown. |
529 |
PVFS2SERVER=/usr/sbin/pvfs2-server |
530 |
|
531 |
# location of your config files |
532 |
PVFS2_CONF_PATH=/etc |
533 |
|
534 |
# the server will record its PID in this file using the -p argument |
535 |
PVFS2_PIDFILE=/var/run/pvfs2.pid |
536 |
|
537 |
#Additional options |
538 |
PVFS2_OPTIONS="" |
539 |
|
540 |
# Automatically call pvfs2-server with --mkfs when we detect that the |
541 |
# server is not continuing to run? |
542 |
PVFS2_AUTO_MKFS=0 |
543 |
|
544 |
|
545 |
|
546 |
1.1 sys-cluster/pvfs2/files/pvfs2-server.rc |
547 |
|
548 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-cluster/pvfs2/files/pvfs2-server.rc?rev=1.1&view=markup |
549 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-cluster/pvfs2/files/pvfs2-server.rc?rev=1.1&content-type=text/plain |
550 |
|
551 |
Index: pvfs2-server.rc |
552 |
=================================================================== |
553 |
#!/sbin/runscript |
554 |
# Copyright 1999-2007 Gentoo Foundation |
555 |
# Distributed under the terms of the GNU General Public License v2 |
556 |
# $Header: /var/cvsroot/gentoo-x86/sys-cluster/pvfs2/files/pvfs2-server.rc,v 1.1 2007/10/05 14:03:13 mabi Exp $ |
557 |
|
558 |
checkconfig() { |
559 |
local piddir=$(dirname "${PVFS2_PIDFILE}") |
560 |
if [ ! -d "${piddir}" ]; then |
561 |
mkdir -p "${piddir}" || return 1 |
562 |
fi |
563 |
|
564 |
# verify presence of server binary |
565 |
if ! [ -x "${PVFS2SERVER}" ]; then |
566 |
eerror "Error: could not find executable ${PVFS2SERVER}" |
567 |
return 1 |
568 |
fi |
569 |
|
570 |
# look for fs conf |
571 |
if [ -n "${PVFS2_FS_CONF}" ]; then |
572 |
PVFS2_FS_CONF="${PVFS2_CONF_PATH}/${PVFS2_FS_CONF}" |
573 |
else |
574 |
PVFS2_FS_CONF="${PVFS2_CONF_PATH}"/pvfs2-fs.conf |
575 |
fi |
576 |
|
577 |
if ! [ -r "${PVFS2_FS_CONF}" ]; then |
578 |
eerror "Error: could not read ${PVFS2_FS_CONF}" |
579 |
return 1 |
580 |
fi |
581 |
|
582 |
# look for server conf |
583 |
if [ -n "${PVFS2_SERVER_CONF_BASE}" ]; then |
584 |
local myhost=`hostname -s` |
585 |
if [ "${myhost}" == "localhost" ]; then |
586 |
ewarn "Warning: detected hostname as localhost, may confuse PVFS2 startup" |
587 |
fi |
588 |
PVFS2_SERVER_CONF="${PVFS2_CONF_PATH}/${PVFS2_SERVER_CONF_BASE}-${myhost}" |
589 |
elif [ -n "${PVFS2_SERVER_CONF}" ]; then |
590 |
PVFS2_SERVER_CONF="${PVFS2_CONF_PATH}/${PVFS2_SERVER_CONF}" |
591 |
else |
592 |
PVFS2_SERVER_CONF="${PVFS2_CONF_PATH}/pvfs2-server.conf" |
593 |
fi |
594 |
|
595 |
if ! [ -r "${PVFS2_SERVER_CONF}" ]; then |
596 |
eerror "Error: could not read ${PVFS2_SERVER_CONF}" |
597 |
return 1 |
598 |
fi |
599 |
} |
600 |
|
601 |
depend() { |
602 |
after localmount netmount nfsmount dns |
603 |
use net |
604 |
} |
605 |
|
606 |
start() { |
607 |
ebegin "Starting PVFS2 server" |
608 |
local rc |
609 |
checkconfig || return 1 |
610 |
|
611 |
start-stop-daemon -b --start --quiet \ |
612 |
--pidfile "${PVFS2_PIDFILE}" \ |
613 |
--exec "${PVFS2SERVER}" -- -p "${PVFS2_PIDFILE}" ${PVFS2_OPTIONS} \ |
614 |
"${PVFS2_FS_CONF}" "${PVFS2_SERVER_CONF}" |
615 |
rc=$? |
616 |
|
617 |
# Optionally force pvfs2-server to generate the pvfs2 filesystem. |
618 |
if [[ $PVFS2_AUTO_MKFS -ne 0 ]]; then |
619 |
local test_pid |
620 |
sleep 1 |
621 |
test_pid=$(pidof pvfs2-server) |
622 |
if [ -z "$test_pid" ] || [ ! -f "${PVFS2_PIDFILE}" ] || [[ $test_pid -ne `cat ${PVFS2_PIDFILE}` ]]; then |
623 |
rm -f "${PVFS2_PIDFILE}" &>/dev/null |
624 |
ewarn "Initializing the file system storage with --mkfs" |
625 |
"${PVFS2SERVER}" --mkfs "${PVFS2_FS_CONF}" "${PVFS2_SERVER_CONF}" |
626 |
rc=$? |
627 |
if [[ $rc -ne 0 ]]; then |
628 |
eerror "Failed to initialize the filesystem storage with --mkfs" |
629 |
eend ${rc} |
630 |
return 1 |
631 |
fi |
632 |
start-stop-daemon -b --start --quiet \ |
633 |
--pidfile ${PVFS2_PIDFILE} \ |
634 |
--exec ${PVFS2SERVER} -- -p "${PVFS2_PIDFILE}" ${PVFS2_OPTIONS} \ |
635 |
"${PVFS2_FS_CONF}" "${PVFS2_SERVER_CONF}" |
636 |
rc=$? |
637 |
fi |
638 |
fi |
639 |
|
640 |
if [[ $rc -ne 0 ]]; then |
641 |
eend $rc "Error starting PVFS2 server" |
642 |
return 1 |
643 |
else |
644 |
eend 0 |
645 |
return 0 |
646 |
fi |
647 |
} |
648 |
|
649 |
stop() { |
650 |
ebegin "Stopping PVFS2 server" |
651 |
start-stop-daemon --stop --quiet --pidfile "${PVFS2_PIDFILE}" |
652 |
eend $? "Error stopping PVFS2 server" |
653 |
} |
654 |
|
655 |
restart() { |
656 |
svc_stop |
657 |
sleep 2 |
658 |
svc_start |
659 |
} |
660 |
|
661 |
|
662 |
|
663 |
1.1 sys-cluster/pvfs2/files/pvfs2-client.conf |
664 |
|
665 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-cluster/pvfs2/files/pvfs2-client.conf?rev=1.1&view=markup |
666 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-cluster/pvfs2/files/pvfs2-client.conf?rev=1.1&content-type=text/plain |
667 |
|
668 |
Index: pvfs2-client.conf |
669 |
=================================================================== |
670 |
# Extra arguments to supply to the pvfs2-client daemon |
671 |
#PVFS2_CLIENT_ARGS="-L /var/log/pvfs2-client.log" |
672 |
|
673 |
# Location of the pvfs2-client binaries. Defaults are shown |
674 |
PVFS2_CLIENT="/usr/sbin/pvfs2-client" |
675 |
PVFS2_CLIENT_CORE="/usr/sbin/pvfs2-client-core" |
676 |
|
677 |
# Location to mount the pvfs2 filesystem |
678 |
PVFS2_MOUNTPOINT="/pfs" |
679 |
|
680 |
# A pvfs2 metadata server. |
681 |
PVFS2_SERVER_HOST="localhost" |
682 |
|
683 |
# Location to store pid |
684 |
PVFS2_CLIENT_PIDFILE="/var/run/pvfs2-client.pid" |
685 |
|
686 |
|
687 |
|
688 |
-- |
689 |
gentoo-commits@g.o mailing list |