summaryrefslogtreecommitdiffstats
path: root/xlators/performance/read-ahead/src
diff options
context:
space:
mode:
authorAnand V. Avati <avati@blackhole.gluster.com>2010-03-16 09:46:33 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-03-16 08:31:32 -0700
commit283ec9608e6cbc9393941d5fae901e558360d2bd (patch)
tree5d90ea94d5df8fd542b30d6e88f44b940133d9b2 /xlators/performance/read-ahead/src
parentcc7515fc3db005383ffa575236ec29c212ed1e48 (diff)
iatt: changes across the codebase
- libglusterfs -- call-stub -- inode -- protocol - libglusterfsclient - cluster/replicate - cluster/{dht,nufa,switch} - cluster/unify - cluster/HA - cluster/map - cluster/stripe - debug/error-gen - debug/trace - debug/io-stats - encryption/rot-13 - features/filter - features/locks - features/path-converter - features/quota - features/trash - mount/fuse - performance/io-threads - performance/io-cache - performance/quick-read - performance/read-ahead - performance/stat-prefetch - performance/symlink-cache - performance/write-behind - protocol/client - protocol/server - storage-posix Signed-off-by: Anand V. Avati <avati@blackhole.gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 361 (GlusterFS 3.0 should work on Mac OS/X) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=361
Diffstat (limited to 'xlators/performance/read-ahead/src')
-rw-r--r--xlators/performance/read-ahead/src/page.c2
-rw-r--r--xlators/performance/read-ahead/src/read-ahead.c34
-rw-r--r--xlators/performance/read-ahead/src/read-ahead.h2
3 files changed, 13 insertions, 25 deletions
diff --git a/xlators/performance/read-ahead/src/page.c b/xlators/performance/read-ahead/src/page.c
index 07ab84ed8..063258c8f 100644
--- a/xlators/performance/read-ahead/src/page.c
+++ b/xlators/performance/read-ahead/src/page.c
@@ -131,7 +131,7 @@ ra_waitq_return (ra_waitq_t *waitq)
int
ra_fault_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, struct iovec *vector,
- int32_t count, struct stat *stbuf, struct iobref *iobref)
+ int32_t count, struct iatt *stbuf, struct iobref *iobref)
{
ra_local_t *local = NULL;
off_t pending_offset = 0;
diff --git a/xlators/performance/read-ahead/src/read-ahead.c b/xlators/performance/read-ahead/src/read-ahead.c
index 8e140d821..c0a432582 100644
--- a/xlators/performance/read-ahead/src/read-ahead.c
+++ b/xlators/performance/read-ahead/src/read-ahead.c
@@ -70,12 +70,6 @@ ra_open_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
ret = fd_ctx_set (fd, this, (uint64_t)(long)file);
- /* If mandatory locking has been enabled on this file,
- we disable caching on it */
-
- if ((fd->inode->st_mode & S_ISGID) && !(fd->inode->st_mode & S_IXGRP))
- file->disabled = 1;
-
/* If O_DIRECT open, we disable caching on it */
if ((fd->flags & O_DIRECT) || ((fd->flags & O_ACCMODE) == O_WRONLY))
@@ -122,8 +116,8 @@ unwind:
int
ra_create_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, fd_t *fd, inode_t *inode,
- struct stat *buf, struct stat *preparent,
- struct stat *postparent)
+ struct iatt *buf, struct iatt *preparent,
+ struct iatt *postparent)
{
ra_conf_t *conf = NULL;
ra_file_t *file = NULL;
@@ -146,19 +140,13 @@ ra_create_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
ret = fd_ctx_set (fd, this, (uint64_t)(long)file);
- /* If mandatory locking has been enabled on this file,
- we disable caching on it */
-
- if ((fd->inode->st_mode & S_ISGID) && !(fd->inode->st_mode & S_IXGRP))
- file->disabled = 1;
-
/* If O_DIRECT open, we disable caching on it */
if ((fd->flags & O_DIRECT) || ((fd->flags & O_ACCMODE) == O_WRONLY))
file->disabled = 1;
file->offset = (unsigned long long) 0;
- //file->size = fd->inode->buf.st_size;
+ //file->size = fd->inode->buf.ia_size;
file->conf = conf;
file->pages.next = &file->pages;
file->pages.prev = &file->pages;
@@ -330,7 +318,7 @@ read_ahead (call_frame_t *frame, ra_file_t *file)
int
ra_need_atime_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, struct iovec *vector,
- int32_t count, struct stat *stbuf, struct iobref *iobref)
+ int32_t count, struct iatt *stbuf, struct iobref *iobref)
{
STACK_DESTROY (frame->root);
return 0;
@@ -425,7 +413,7 @@ out:
int
ra_readv_disabled_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, struct iovec *vector,
- int32_t count, struct stat *stbuf, struct iobref *iobref)
+ int32_t count, struct iatt *stbuf, struct iobref *iobref)
{
STACK_UNWIND_STRICT (readv, frame, op_ret, op_errno, vector, count,
stbuf, iobref);
@@ -543,7 +531,7 @@ ra_flush_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret,
int
ra_fsync_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret,
- int32_t op_errno, struct stat *prebuf, struct stat *postbuf)
+ int32_t op_errno, struct iatt *prebuf, struct iatt *postbuf)
{
STACK_UNWIND_STRICT (fsync, frame, op_ret, op_errno, prebuf, postbuf);
return 0;
@@ -616,8 +604,8 @@ unwind:
int
ra_writev_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno, struct stat *prebuf,
- struct stat *postbuf)
+ int32_t op_ret, int32_t op_errno, struct iatt *prebuf,
+ struct iatt *postbuf)
{
fd_t *fd = NULL;
ra_file_t *file = NULL;
@@ -677,8 +665,8 @@ unwind:
int
ra_truncate_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno, struct stat *prebuf,
- struct stat *postbuf)
+ int32_t op_ret, int32_t op_errno, struct iatt *prebuf,
+ struct iatt *postbuf)
{
STACK_UNWIND_STRICT (truncate, frame, op_ret, op_errno, prebuf,
postbuf);
@@ -688,7 +676,7 @@ ra_truncate_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int
ra_attr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno, struct stat *buf)
+ int32_t op_ret, int32_t op_errno, struct iatt *buf)
{
STACK_UNWIND_STRICT (stat, frame, op_ret, op_errno, buf);
return 0;
diff --git a/xlators/performance/read-ahead/src/read-ahead.h b/xlators/performance/read-ahead/src/read-ahead.h
index d11143551..0ad47fc75 100644
--- a/xlators/performance/read-ahead/src/read-ahead.h
+++ b/xlators/performance/read-ahead/src/read-ahead.h
@@ -98,7 +98,7 @@ struct ra_file {
size_t size;
int32_t refcount;
pthread_mutex_t file_lock;
- struct stat stbuf;
+ struct iatt stbuf;
uint64_t page_size;
uint32_t page_count;
};