VFS, FSes: add REQ_PEEK request type

REQ_PEEK behaves just like REQ_READ except that it does not copy
data anywhere, just obtains the blocks from the FS into the cache.

To be used by the future mmap implementation.

Change-Id: I1b56de304f0a7152b69a72c8962d04258adb44f9
This commit is contained in:
Ben Gras
2013-03-07 10:57:38 +00:00
parent 1ba514e19c
commit a9f55a2e46
15 changed files with 116 additions and 37 deletions
+1
View File
@@ -72,6 +72,7 @@
#define BYTE 0377 /* mask for 8 bits */
#define READING 0 /* copy data to user */
#define WRITING 1 /* copy data from user */
#define PEEKING 2 /* retrieve FS data without copying */
#define HAVE_SCATTERED_IO 1 /* scattered I/O is now standard */
/* Memory is allocated in clicks. */
+2 -1
View File
@@ -114,8 +114,9 @@ typedef struct {
#define REQ_RDLINK (VFS_BASE + 30)
#define REQ_GETDENTS (VFS_BASE + 31)
#define REQ_STATVFS (VFS_BASE + 32)
#define REQ_PEEK (VFS_BASE + 33)
#define NREQS 33
#define NREQS 34
#define IS_VFS_RQ(type) (((type) & ~0xff) == VFS_BASE)