Bug 1330567 - SAMBA+TIER : File size is not getting updated when created on windows samba share mount
Summary: SAMBA+TIER : File size is not getting updated when created on windows samba s...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: tiering
Version: mainline
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Mohammed Rafi KC
QA Contact: bugs@gluster.org
URL:
Whiteboard:
Depends On: 1322247
Blocks: 1331263
TreeView+ depends on / blocked
 
Reported: 2016-04-26 13:27 UTC by Mohammed Rafi KC
Modified: 2016-06-16 14:04 UTC (History)
10 users (show)

Fixed In Version: glusterfs-3.8rc2
Doc Type: Bug Fix
Doc Text:
Clone Of: 1322247
: 1331263 (view as bug list)
Environment:
Last Closed: 2016-06-16 14:04:21 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:


Attachments (Terms of Use)

Description Mohammed Rafi KC 2016-04-26 13:27:15 UTC
+++ This bug was initially created as a clone of Bug #1322247 +++

Description of problem:
On a windows client when a tiered volume is mounted and microsoft office files are created with some data in it, the size of the file is still remains 0KB.

For a distribute volume it reflects the actual size for the same files.
Even on "cifs" & "fuse" the actual size is reflecting.

Version-Release number of selected component (if applicable):

mainline

How reproducible:
Always

Steps to Reproduce:

1.Mount a tier volume (cold tier : Distributed-Disperse | 2 x (8 + 4) | Hot Tier Type : Distributed-Replicate 4 x 2 = 8) on windows client

2. Create docx files with data in it.
3.do ls in smbclient

Actual results:

File size is 0KB

Expected results:

Actual size should reflect

Additional info:

--- Additional comment from Vivek Das on 2016-03-30 03:00:20 EDT ---


--- Additional comment from Mohammed Rafi KC on 2016-04-15 10:27:18 EDT ---

Myself together with Anoop CS reproduced the issue using both windows machine and smbclient

set-up details : gluster - upstream master
                samba - 4.4

The problem turned out to be the same problem with T file issue in tiering which is described in #bug 1303298 .

RCA:

For tiered volume , we send readdirp only to cold tier for performance improvement and other functional issues. Since cold tier is the default hashed subvol, every file or corresponding linkfile should be there in cold tier. For files in hot tier, there will be a linkfile and readdirp from cold tier for such files will not have proper attributes. In normal client stack, tier xlators will set inode=null for such entries to force a lookup in case of fuse mount and for nfs , we will set a flag to let nfs client know about such an entry as a stale.

In case of samba client, They will just print what they got, means the stat will have only sticky bit set.

More details:

We brought this fix to increase the readdir performance and to fix an issue which can potentially result in data loss (#bug 1278384). So reverting the changes will result in  performance drop in readdir and we need additional patch to solve the issue in #bug 1278384.

Otherwise we can fix this problem from gf_api layer or from tier layer by doing a stat to hot tier for entries in hot tier, which will also give a worst performance if there are two or more entries in hot tier. We can reduce the performance drop by introducing bulk lookup (one lookup for all entries since files can be either in hot or cold).

Or otherwise if there is any way to let samba client about a stale entry in a readdirp, we could try that also, so that samba can do a stat before printing it.

Comment 1 Vijay Bellur 2016-04-26 13:28:44 UTC
REVIEW: http://review.gluster.org/14079 (gf_api: fill iatt in readdirp_cbk if entry->inode is null;) posted (#1) for review on master by mohammed rafi  kc (rkavunga@redhat.com)

Comment 2 Vijay Bellur 2016-04-28 07:21:51 UTC
REVIEW: http://review.gluster.org/14079 (gf_api: fill iatt in readdirp_cbk if entry->inode is null;) posted (#2) for review on master by mohammed rafi  kc (rkavunga@redhat.com)

Comment 3 Vijay Bellur 2016-04-28 09:30:31 UTC
REVIEW: http://review.gluster.org/14079 (gf_api: fill iatt in readdirp_cbk if entry->inode is null;) posted (#3) for review on master by Rajesh Joseph (rjoseph@redhat.com)

Comment 4 Vijay Bellur 2016-04-28 12:21:19 UTC
REVIEW: http://review.gluster.org/14079 (gfapi: fill iatt in readdirp_cbk if entry->inode is null) posted (#4) for review on master by mohammed rafi  kc (rkavunga@redhat.com)

Comment 5 Vijay Bellur 2016-04-28 13:21:39 UTC
REVIEW: http://review.gluster.org/14079 (gfapi: fill iatt in readdirp_cbk if entry->inode is null) posted (#5) for review on master by mohammed rafi  kc (rkavunga@redhat.com)

Comment 6 Vijay Bellur 2016-04-28 19:53:44 UTC
COMMIT: http://review.gluster.org/14079 committed in master by Niels de Vos (ndevos@redhat.com) 
------
commit 9423bdeed169076ebedd9af40b52aaac58c9839e
Author: Mohammed Rafi KC <rkavunga@redhat.com>
Date:   Tue Apr 26 16:59:30 2016 +0530

    gfapi: fill iatt in readdirp_cbk if entry->inode is null
    
    If any of dirent have inode as null in readdirp_cbk, which indicates
    that the stat information is not valid. So for such entries, we send
    explicit lookup to fill the stat information.
    
    Change-Id: I0604bce34583db0bb04b5aae8933766201c6ddad
    BUG: 1330567
    Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
    Reviewed-on: http://review.gluster.org/14079
    NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
    Smoke: Gluster Build System <jenkins@build.gluster.com>
    CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
    Reviewed-by: Niels de Vos <ndevos@redhat.com>

Comment 7 Niels de Vos 2016-06-16 14:04:21 UTC
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.8.0, please open a new bug report.

glusterfs-3.8.0 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] http://blog.gluster.org/2016/06/glusterfs-3-8-released/
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user


Note You need to log in before you can comment on or make changes to this bug.