Bug 1235410

Summary: [USS] Newly created directory should not show snapshots created before the directory
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: Anil Shah <ashah>
Component: snapshotAssignee: Bug Updates Notification Mailing List <rhs-bugs>
Status: CLOSED WONTFIX QA Contact: storage-qa-internal <storage-qa-internal>
Severity: high Docs Contact:
Priority: unspecified    
Version: rhgs-3.1CC: rhs-bugs
Target Milestone: ---Keywords: Triaged, ZStream
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-04-16 16:03:32 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1223636    

Description Anil Shah 2015-06-24 17:47:39 UTC
Description of problem:

You have some snapshot created and uss enabled, you create new directory and cd .snaps folder. You can see the previous snapshot created which is was created before directory got created.
and you cd the those snaps it will give error stale file handle.

If you can't access those snaps, there is not point in listing those snaps which were created before directory creation.

Same is the behaviour in USS-CIFS. Then it should be same in USS-FUSE/NFS too.


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

[root@darkknightrises ~]# rpm -qa | grep glusterfs
glusterfs-libs-3.7.1-5.el6rhs.x86_64
glusterfs-api-3.7.1-5.el6rhs.x86_64
samba-vfs-glusterfs-4.1.17-7.el6rhs.x86_64
glusterfs-3.7.1-5.el6rhs.x86_64
glusterfs-fuse-3.7.1-5.el6rhs.x86_64
glusterfs-cli-3.7.1-5.el6rhs.x86_64
glusterfs-geo-replication-3.7.1-5.el6rhs.x86_64
glusterfs-debuginfo-3.7.1-5.el6rhs.x86_64
glusterfs-client-xlators-3.7.1-5.el6rhs.x86_64
glusterfs-server-3.7.1-5.el6rhs.x86_64


How reproducible:

100%

Steps to Reproduce:
1. create 2*2 Distribute-replicate volume
2. Do fuse mount 
3. Create some snapshot, activate it and enable USS
4. Create and directory on mount point 
5. create snapshot and activate it.
6. Cd to newly created directory and cd .snaps
7. List the snapshots.


Actual results:

It will list all the snapshots which were create before creation of directory.
and if access those snapshot, it will give stale file handle error.

If we can't access that snapshot, what's the point of listing that snapshot.


Expected results:

It should not snapshots created before the directory got created.

Additional info: