Bug 1479474 - Add NULL gfid checks before creating file
Add NULL gfid checks before creating file
Status: MODIFIED
Product: GlusterFS
Classification: Community
Component: posix (Show other bugs)
3.12
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Ravishankar N
: Triaged
Depends On: 1478297
Blocks:
  Show dependency treegraph
 
Reported: 2017-08-08 11:28 EDT by Ravishankar N
Modified: 2017-08-16 07:55 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1478297
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Ravishankar N 2017-08-08 11:28:07 EDT
+++ This bug was initially created as a clone of Bug #1478297 +++

Description of problem:
Add checks in code to prevent file potentially being created with a gfid of all zeroes.

--- Additional comment from Worker Ant on 2017-08-04 04:40:51 EDT ---

REVIEW: https://review.gluster.org/17975 (posix: add null gfid checks) posted (#1) for review on master by Ravishankar N (ravishankar@redhat.com)

--- Additional comment from Worker Ant on 2017-08-05 03:59:24 EDT ---

REVIEW: https://review.gluster.org/17981 (afr: Prevent null gfids in self-heal entry re-creation) posted (#1) for review on master by Ravishankar N (ravishankar@redhat.com)

--- Additional comment from Worker Ant on 2017-08-05 04:21:56 EDT ---

REVIEW: https://review.gluster.org/17975 (posix: add null gfid checks) posted (#2) for review on master by Ravishankar N (ravishankar@redhat.com)

--- Additional comment from Worker Ant on 2017-08-07 04:55:36 EDT ---

REVIEW: https://review.gluster.org/17975 (posix: add null gfid checks) posted (#3) for review on master by Ravishankar N (ravishankar@redhat.com)

--- Additional comment from Worker Ant on 2017-08-07 23:37:05 EDT ---

COMMIT: https://review.gluster.org/17981 committed in master by Ravishankar N (ravishankar@redhat.com) 
------
commit bead74a6e085001225bc0704bad1a5db36dd75a1
Author: Ravishankar N <ravishankar@redhat.com>
Date:   Fri Aug 4 16:23:46 2017 +0530

    afr: Prevent null gfids in self-heal entry re-creation
    
    Change-Id: I5acb8bd0a19fc4e764d61e349bb690b5236ee610
    BUG: 1478297
    Signed-off-by: Ravishankar N <ravishankar@redhat.com>
    Reviewed-on: https://review.gluster.org/17981
    Smoke: Gluster Build System <jenkins@build.gluster.org>
    CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
    Reviewed-by: Amar Tumballi <amarts@redhat.com>
    Reviewed-by: Karthik U S <ksubrahm@redhat.com>

--- Additional comment from Worker Ant on 2017-08-08 08:54:29 EDT ---

COMMIT: https://review.gluster.org/17975 committed in master by Raghavendra Bhat (raghavendra@redhat.com) 
------
commit c63aa2239bc682739328e0aa6cbcb3279a72a8e2
Author: Ravishankar N <ravishankar@redhat.com>
Date:   Mon Aug 7 12:14:23 2017 +0530

    posix: add null gfid checks
    
    ...in file/dir creation and lookup codepaths. The check is relaxed for
    fops coming from trash xlator at the moment until trash has client side
    logic to send the create fops with gfid-req.
    
    Also fixed the missing trash pid assignment in creates sent by trash
    xlator. Without this, truncated files won't be moved to .trashcan.
    
    Change-Id: Ieddd7f0634850e7c7010e4fbb4ad1eead35888c8
    BUG: 1478297
    Signed-off-by: Ravishankar N <ravishankar@redhat.com>
    Reviewed-on: https://review.gluster.org/17975
    Smoke: Gluster Build System <jenkins@build.gluster.org>
    Reviewed-by: jiffin tony Thottan <jthottan@redhat.com>
    CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
    Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
Comment 1 Worker Ant 2017-08-08 12:17:37 EDT
REVIEW: https://review.gluster.org/17996 (posix: add null gfid checks) posted (#1) for review on release-3.12 by Ravishankar N (ravishankar@redhat.com)
Comment 2 Worker Ant 2017-08-08 12:18:31 EDT
REVIEW: https://review.gluster.org/17997 (afr: Prevent null gfids in self-heal entry re-creation) posted (#1) for review on release-3.12 by Ravishankar N (ravishankar@redhat.com)
Comment 3 Worker Ant 2017-08-12 09:29:52 EDT
COMMIT: https://review.gluster.org/17996 committed in release-3.12 by Shyamsundar Ranganathan (srangana@redhat.com) 
------
commit 517316470e8e309e0e572264ee3c02b0748acab1
Author: Ravishankar N <ravishankar@redhat.com>
Date:   Tue Aug 8 21:42:03 2017 +0530

    posix: add null gfid checks
    
    (Backport of https://review.gluster.org/17975)
    
    ...in file/dir creation and lookup codepaths. The check is relaxed for
    fops coming from trash xlator at the moment until trash has client side
    logic to send the create fops with gfid-req.
    
    Also fixed the missing trash pid assignment in creates sent by trash
    xlator. Without this, truncated files won't be moved to .trashcan.
    
    Change-Id: Ieddd7f0634850e7c7010e4fbb4ad1eead35888c8
    BUG: 1479474
    Signed-off-by: Ravishankar N <ravishankar@redhat.com>
    Reviewed-on: https://review.gluster.org/17996
    Smoke: Gluster Build System <jenkins@build.gluster.org>
    CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
    Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
Comment 4 Worker Ant 2017-08-12 09:30:38 EDT
COMMIT: https://review.gluster.org/17997 committed in release-3.12 by Shyamsundar Ranganathan (srangana@redhat.com) 
------
commit 814104fb21bd93d479797c4b635242ecb7fdf23f
Author: Ravishankar N <ravishankar@redhat.com>
Date:   Fri Aug 4 16:23:46 2017 +0530

    afr: Prevent null gfids in self-heal entry re-creation
    
    > Reviewed-on: https://review.gluster.org/17981
    > Smoke: Gluster Build System <jenkins@build.gluster.org>
    > CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
    > Reviewed-by: Amar Tumballi <amarts@redhat.com>
    > Reviewed-by: Karthik U S <ksubrahm@redhat.com>
    (cherry picked from commit bead74a6e085001225bc0704bad1a5db36dd75a1)
    
    Change-Id: I5acb8bd0a19fc4e764d61e349bb690b5236ee610
    BUG: 1479474
    Signed-off-by: Ravishankar N <ravishankar@redhat.com>
    Reviewed-on: https://review.gluster.org/17997
    Smoke: Gluster Build System <jenkins@build.gluster.org>
    CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
    Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>

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