diff options
author | Andrew Tridgell <tridge@samba.org> | 2009-05-28 16:12:34 +1000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2009-05-28 16:12:34 +1000 |
commit | 5ab03dbecc33320e23304b126f26bde3f6bc6c7d (patch) | |
tree | f8478334db04fe03f6ed0a88622a50fe2586b91c /source3/modules/vfs_tsmsm.c | |
parent | 47692f39b1b3b5c589bfb63a6968aaf9f9af70c4 (diff) | |
parent | bd1194810787901c5caa08961f97fecbcbd01978 (diff) | |
download | samba-5ab03dbecc33320e23304b126f26bde3f6bc6c7d.tar.gz samba-5ab03dbecc33320e23304b126f26bde3f6bc6c7d.tar.bz2 samba-5ab03dbecc33320e23304b126f26bde3f6bc6c7d.zip |
Merge branch 'master' of ssh://git.samba.org/data/git/samba
Diffstat (limited to 'source3/modules/vfs_tsmsm.c')
-rw-r--r-- | source3/modules/vfs_tsmsm.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/source3/modules/vfs_tsmsm.c b/source3/modules/vfs_tsmsm.c index 6fb1d1d2d4..57807105f6 100644 --- a/source3/modules/vfs_tsmsm.c +++ b/source3/modules/vfs_tsmsm.c @@ -153,10 +153,12 @@ static bool tsmsm_is_offline(struct vfs_handle_struct *handle, /* if the file has more than FILE_IS_ONLINE_RATIO of blocks available, then assume it is not offline (it may not be 100%, as it could be sparse) */ - if (512 * (off_t)stbuf->st_blocks >= stbuf->st_size * tsmd->online_ratio) { + if (512 * (off_t)stbuf->st_ex_blocks >= + stbuf->st_ex_size * tsmd->online_ratio) { DEBUG(10,("%s not offline: st_blocks=%ld st_size=%ld " - "online_ratio=%.2f\n", path, (long)stbuf->st_blocks, - (long)stbuf->st_size, tsmd->online_ratio)); + "online_ratio=%.2f\n", path, + (long)stbuf->st_ex_blocks, + (long)stbuf->st_ex_size, tsmd->online_ratio)); return false; } @@ -254,9 +256,10 @@ static bool tsmsm_aio_force(struct vfs_handle_struct *handle, struct files_struc */ if(SMB_VFS_FSTAT(fsp, &sbuf) == 0) { DEBUG(10,("tsmsm_aio_force st_blocks=%ld st_size=%ld " - "online_ratio=%.2f\n", (long)sbuf.st_blocks, - (long)sbuf.st_size, tsmd->online_ratio)); - return !(512 * (off_t)sbuf.st_blocks >= sbuf.st_size * tsmd->online_ratio); + "online_ratio=%.2f\n", (long)sbuf.st_ex_blocks, + (long)sbuf.st_ex_size, tsmd->online_ratio)); + return !(512 * (off_t)sbuf.st_ex_blocks >= + sbuf.st_ex_size * tsmd->online_ratio); } return false; } |