junneyang / zumastor

Automatically exported from code.google.com/p/zumastor
0 stars 1 forks source link

ddsnap server fails to set PF_MEMALLOC with 2.4.24.2 #125

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The PF_SET_MEMALLOC and PF_SET_LESS_THROTTLE flags change from 21 and 22 to
23 and 24 when we upgrade from 2.6.22.10 to 2.6.24.2. But we forgot to
change those values in ddsnapd.c. So 'ddsnap server' outputs the error
"failed to enter memalloc mode (may deadlock)" when running with the
2.6.24.2 kernel. Here is the proposed fix:

Index: ddsnapd.c
===================================================================
--- ddsnapd.c   (revision 1615)
+++ ddsnapd.c   (working copy)
@@ -70,8 +70,8 @@
  * kernel headers. Make sure that these are same when
  * building with a new kernel.
  */
-#define PR_SET_LESS_THROTTLE 21
-#define PR_SET_MEMALLOC        22
+#define PR_SET_LESS_THROTTLE 23
+#define PR_SET_MEMALLOC        24
 #define MAX_NEW_METACHUNKS 10

 #define trace trace_off

The adding of PR_SET_MEMALLOC and PR_SET_LESS_THROTTLE is a tiny linux
kernel change. Maybe we should try to first push this change into the
mainline kernel?

Jiaying

Original issue reported on code.google.com by jiahotc...@gmail.com on 30 Apr 2008 at 9:42

GoogleCodeExporter commented 9 years ago
Fixed with revision 1621.

Original comment by jiahotc...@gmail.com on 30 Apr 2008 at 10:32