>From Kinglong Mee <[email protected]>:

Kinglong Mee has uploaded this change for review. ( 
https://review.gerrithub.io/391415


Change subject: MDCAHCE: fix bad setting of MDCACHE_TRUST_ATTRS when refresh 
attrs
......................................................................

MDCAHCE: fix bad setting of MDCACHE_TRUST_ATTRS when refresh attrs

Two WRITEs of the same file, the second WRITE returns bad attrs as the first.

Thread one                              thread two

mdcache_write2()
  atomic_clear MDCACHE_TRUST_ATTRS
mdcache_getattrs()
  wrlock(&entry->attr_lock)
  mdcache_refresh_attrs()
    obj_ops.getattrs()                  mdcache_write2()
                                          atomic_clear MDCACHE_TRUST_ATTRS
    mdc_fixup_md()
      set MDCACHE_TRUST_ATTRS
  unlock(&entry->attr_lock)
                                        mdcache_getattrs()
                                          tusts the attrs in MDCACHE

This patch records the count of atomic_clear(MDCACHE_TRUST_ATTRS) during
attrs refreshing, sets MDCACHE_TRUST_ATTRS only if the count is zero
after attrs is refreshed.

Change-Id: I2d47aab44e5f8e89611b22f8f2fdf81e849c8e85
Signed-off-by: Kinglong Mee <[email protected]>
---
M src/FSAL/Stackable_FSALs/FSAL_MDCACHE/mdcache_file.c
M src/FSAL/Stackable_FSALs/FSAL_MDCACHE/mdcache_handle.c
M src/FSAL/Stackable_FSALs/FSAL_MDCACHE/mdcache_helpers.c
M src/FSAL/Stackable_FSALs/FSAL_MDCACHE/mdcache_int.h
M src/FSAL/Stackable_FSALs/FSAL_MDCACHE/mdcache_up.c
5 files changed, 35 insertions(+), 37 deletions(-)



  git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha 
refs/changes/15/391415/1
-- 
To view, visit https://review.gerrithub.io/391415
To unsubscribe, visit https://review.gerrithub.io/settings

Gerrit-Project: ffilz/nfs-ganesha
Gerrit-Branch: next
Gerrit-MessageType: newchange
Gerrit-Change-Id: I2d47aab44e5f8e89611b22f8f2fdf81e849c8e85
Gerrit-Change-Number: 391415
Gerrit-PatchSet: 1
Gerrit-Owner: Kinglong Mee <[email protected]>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Nfs-ganesha-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nfs-ganesha-devel

Reply via email to