summaryrefslogtreecommitdiffstats
path: root/xlators/performance/quick-read
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/quick-read
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/quick-read')
-rw-r--r--xlators/performance/quick-read/src/quick-read.c36
-rw-r--r--xlators/performance/quick-read/src/quick-read.h2
2 files changed, 19 insertions, 19 deletions
diff --git a/xlators/performance/quick-read/src/quick-read.c b/xlators/performance/quick-read/src/quick-read.c
index 5dd33486c71..36cfc42b47d 100644
--- a/xlators/performance/quick-read/src/quick-read.c
+++ b/xlators/performance/quick-read/src/quick-read.c
@@ -150,7 +150,7 @@ out:
int32_t
qr_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, inode_t *inode,
- struct stat *buf, dict_t *dict, struct stat *postparent)
+ struct iatt *buf, dict_t *dict, struct iatt *postparent)
{
data_t *content = NULL;
qr_file_t *qr_file = NULL;
@@ -164,11 +164,11 @@ qr_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
conf = this->private;
- if (buf->st_size > conf->max_file_size) {
+ if (buf->ia_size > conf->max_file_size) {
goto out;
}
- if (S_ISDIR (buf->st_mode)) {
+ if (IA_ISDIR (buf->ia_type)) {
goto out;
}
@@ -215,7 +215,7 @@ unlock:
LOCK (&qr_file->lock);
{
if (qr_file->xattr
- && (qr_file->stbuf.st_mtime != buf->st_mtime)) {
+ && (qr_file->stbuf.ia_mtime != buf->ia_mtime)) {
dict_unref (qr_file->xattr);
qr_file->xattr = NULL;
}
@@ -546,7 +546,7 @@ qr_need_validation (qr_conf_t *conf, qr_file_t *file)
static int32_t
qr_validate_cache_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)
{
qr_file_t *qr_file = NULL;
qr_local_t *local = NULL;
@@ -580,7 +580,7 @@ qr_validate_cache_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
LOCK (&qr_file->lock);
{
- if (qr_file->stbuf.st_mtime != buf->st_mtime) {
+ if (qr_file->stbuf.ia_mtime != buf->ia_mtime) {
dict_unref (qr_file->xattr);
qr_file->xattr = NULL;
}
@@ -729,7 +729,7 @@ out:
int32_t
qr_readv_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)
+ struct iatt *stbuf, struct iobref *iobref)
{
STACK_UNWIND_STRICT (readv, frame, op_ret, op_errno, vector, count,
stbuf, iobref);
@@ -759,7 +759,7 @@ qr_readv (call_frame_t *frame, xlator_t *this, fd_t *fd, size_t size,
char need_open = 0, can_wind = 0, need_unwind = 0;
struct iobuf *iobuf = NULL;
struct iobref *iobref = NULL;
- struct stat stbuf = {0, };
+ struct iatt stbuf = {0, };
data_t *content = NULL;
qr_fd_ctx_t *qr_fd_ctx = NULL;
call_stub_t *stub = NULL;
@@ -978,8 +978,8 @@ out:
int32_t
qr_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)
{
STACK_UNWIND_STRICT (writev, frame, op_ret, op_errno, prebuf, postbuf);
return 0;
@@ -1098,7 +1098,7 @@ out:
int32_t
qr_fstat_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int32_t op_ret,
- int32_t op_errno, struct stat *buf)
+ int32_t op_errno, struct iatt *buf)
{
STACK_UNWIND_STRICT (fstat, frame, op_ret, op_errno, buf);
return 0;
@@ -1195,7 +1195,7 @@ out:
int32_t
qr_fsetattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno,
- struct stat *preop, struct stat *postop)
+ struct iatt *preop, struct iatt *postop)
{
STACK_UNWIND_STRICT (fsetattr, frame, op_ret, op_errno, preop, postop);
return 0;
@@ -1204,7 +1204,7 @@ qr_fsetattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t
qr_fsetattr_helper (call_frame_t *frame, xlator_t *this, fd_t *fd,
- struct stat *stbuf, int32_t valid)
+ struct iatt *stbuf, int32_t valid)
{
STACK_WIND(frame, qr_fsetattr_cbk, FIRST_CHILD(this),
FIRST_CHILD(this)->fops->fsetattr, fd, stbuf,
@@ -1215,7 +1215,7 @@ qr_fsetattr_helper (call_frame_t *frame, xlator_t *this, fd_t *fd,
int32_t
qr_fsetattr (call_frame_t *frame, xlator_t *this, fd_t *fd,
- struct stat *stbuf, int32_t valid)
+ struct iatt *stbuf, int32_t valid)
{
uint64_t value = 0;
int flags = 0;
@@ -1765,7 +1765,7 @@ out:
int32_t
qr_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;
@@ -1859,8 +1859,8 @@ out:
int32_t
qr_ftruncate_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)
{
int32_t ret = 0;
uint64_t value = 0;
@@ -1886,7 +1886,7 @@ qr_ftruncate_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
if (qr_file) {
LOCK (&qr_file->lock);
{
- if (qr_file->stbuf.st_size != postbuf->st_size)
+ if (qr_file->stbuf.ia_size != postbuf->ia_size)
{
dict_unref (qr_file->xattr);
qr_file->xattr = NULL;
diff --git a/xlators/performance/quick-read/src/quick-read.h b/xlators/performance/quick-read/src/quick-read.h
index 5ced44e1d07..e5bca63767e 100644
--- a/xlators/performance/quick-read/src/quick-read.h
+++ b/xlators/performance/quick-read/src/quick-read.h
@@ -66,7 +66,7 @@ typedef struct qr_local qr_local_t;
struct qr_file {
dict_t *xattr;
- struct stat stbuf;
+ struct iatt stbuf;
struct timeval tv;
gf_lock_t lock;
};