[PVFS2-CVS]
commit by neill in pvfs2/src/kernel/linux-2.6: devpvfs2-req.c
file.c pvfs2-kernel.h
CVS commit program
cvs at parl.clemson.edu
Wed Sep 15 15:48:27 EDT 2004
Update of /projects/cvsroot/pvfs2/src/kernel/linux-2.6
In directory parlweb:/tmp/cvs-serv25938/src/kernel/linux-2.6
Modified Files:
devpvfs2-req.c file.c pvfs2-kernel.h
Log Message:
- put large print statement into a macro for convenience
- make all bufmap allocations GFP_KERNEL, regardless of highmem usage
- use add_waitqueue_exclusive for the io_completion_waitq entries
- clear random readahead hint on mmap
Index: devpvfs2-req.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/kernel/linux-2.6/devpvfs2-req.c,v
diff -p -u -r1.42 -r1.43
--- devpvfs2-req.c 13 Sep 2004 20:52:52 -0000 1.42
+++ devpvfs2-req.c 15 Sep 2004 18:48:26 -0000 1.43
@@ -26,6 +26,19 @@ extern spinlock_t pvfs2_superblocks_lock
static int open_access_count = 0;
+#define DUMP_DEVICE_ERROR() \
+pvfs2_error("*****************************************************\n");\
+pvfs2_error("PVFS2 Device Error: You cannot open the device file "); \
+pvfs2_error("\n/dev/%s more than once. Please make sure that\nthere " \
+ "are no ", PVFS2_REQDEVICE_NAME); \
+pvfs2_error("instances of a program using this device\ncurrently " \
+ "running. (You must verify this!)\n"); \
+pvfs2_error("For example, you can use the lsof program as follows:\n");\
+pvfs2_error("'lsof | grep %s' (run this as root)\n", \
+ PVFS2_REQDEVICE_NAME); \
+pvfs2_error(" open_access_count = %d\n", open_access_count); \
+pvfs2_error("*****************************************************\n")
+
static int pvfs2_devreq_open(
struct inode *inode,
struct file *file)
@@ -59,17 +72,7 @@ static int pvfs2_devreq_open(
}
else
{
- pvfs2_error("*****************************************************\n");
- pvfs2_error("PVFS2 Device Error: You cannot open the device file ");
- pvfs2_error("\n/dev/%s more than once. Please make sure that\nthere "
- "are no ", PVFS2_REQDEVICE_NAME);
- pvfs2_error("instances of a program using this device\ncurrently "
- "running. (You must verify this!)\n");
- pvfs2_error("For example, you can use the lsof program as follows:\n");
- pvfs2_error("'lsof | grep %s' (run this as root)\n",
- PVFS2_REQDEVICE_NAME);
- pvfs2_error(" open_access_count = %d\n", open_access_count);
- pvfs2_error("*****************************************************\n");
+ DUMP_DEVICE_ERROR();
}
up(&devreq_semaphore);
@@ -264,7 +267,8 @@ static ssize_t pvfs2_devreq_writev(
int timed_out = 0;
DECLARE_WAITQUEUE(wait_entry, current);
- add_wait_queue(&op->io_completion_waitq, &wait_entry);
+ add_wait_queue_exclusive(
+ &op->io_completion_waitq, &wait_entry);
wake_up_interruptible(&op->waitq);
while(1)
Index: file.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/kernel/linux-2.6/file.c,v
diff -p -u -r1.81 -r1.82
--- file.c 13 Sep 2004 20:52:52 -0000 1.81
+++ file.c 15 Sep 2004 18:48:26 -0000 1.82
@@ -384,6 +384,7 @@ static int pvfs2_file_mmap(struct file *
/* set the sequential readahead hint */
vma->vm_flags |= VM_SEQ_READ;
+ vma->vm_flags &= VM_RAND_READ;
/* have the kernel enforce readonly mmap support for us */
#ifdef PVFS2_LINUX_KERNEL_2_4
Index: pvfs2-kernel.h
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/kernel/linux-2.6/pvfs2-kernel.h,v
diff -p -u -r1.74 -r1.75
--- pvfs2-kernel.h 8 Sep 2004 19:59:03 -0000 1.74
+++ pvfs2-kernel.h 15 Sep 2004 18:48:27 -0000 1.75
@@ -162,13 +162,12 @@ sizeof(uint64_t) + sizeof(pvfs2_downcall
#define PVFS2_CACHE_ALLOC_FLAGS (SLAB_KERNEL)
#define PVFS2_GFP_FLAGS (GFP_KERNEL)
+#define PVFS2_BUFMAP_GFP_FLAGS (GFP_KERNEL)
#ifdef CONFIG_HIGHMEM
-#define PVFS2_BUFMAP_GFP_FLAGS (GFP_ATOMIC)
#define pvfs2_kmap(page) kmap(page)
#define pvfs2_kunmap(page) kunmap(page)
#else
-#define PVFS2_BUFMAP_GFP_FLAGS (GFP_KERNEL)
#define pvfs2_kmap(page) page_address(page)
#define pvfs2_kunmap(page) do {} while(0)
#endif /* CONFIG_HIGHMEM */
More information about the PVFS2-CVS
mailing list