Re: [PATCH 1/2] add signalfd support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 21 Sep 2009 17:21:05 +0300
Or Gerlitz <ogerlitz@xxxxxxxxxxxx> wrote:

> FUJITA Tomonori wrote:
> > We have one change to iSER after 0.9.8 so it's great if you can test 0.9.8
> 
> 0.9.8 doesn't built on my system as of the sync_file_range regression... anyway,

The commit 455a170 and 0e72f18 should fix the issue (I've attached the
patch).


> I have tested the latest git with iser and things are basically
> working (can read and write with sgp_dd),

Cool, thanks for the confirmation.


> no progress on the iscsi_tcp/crc32 module load issue yet.

I think that it's the initiator issue. Initiators on RHEL5.2 (or
something) can't log in too?


diff --git a/usr/util.h b/usr/util.h
index 7497cb6..74aa4af 100644
--- a/usr/util.h
+++ b/usr/util.h
@@ -7,6 +7,7 @@
 #include <unistd.h>
 #include <errno.h>
 #include <endian.h>
+#include <sys/syscall.h>
 #include "be_byteshift.h"
 
 #define roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y))
@@ -94,14 +95,19 @@ do {									\
 
 extern unsigned long pagesize, pageshift;
 
-#ifdef SYNC_FILE_RANGE_WAIT_BEFORE
+#if defined (SYNC_FILE_RANGE_WAIT_BEFORE) && \
+	(defined(__NR_sync_file_range) || defined(__NR_sync_file_range2))
 static inline int __sync_file_range(int fd, __off64_t offset, __off64_t bytes)
 {
 	int ret;
+#if defined(__NR_sync_file_range)
+	long int n = __NR_sync_file_range;
+#else
+	long int n = __NR_sync_file_range2;
+#endif
 	unsigned int flags = SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE
 		| SYNC_FILE_RANGE_WAIT_AFTER;
-
-	ret = sync_file_range(fd, offset, bytes, flags);
+	ret = syscall(n, fd, offset, bytes, flags);
 	if (ret)
 		ret = fsync(fd);
 	return ret;
--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux SCSI]     [Linux RAID]     [Linux Clusters]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]

  Powered by Linux