| Summary: | Add a specialized STACK_UNWIND macro for each FOP | ||
|---|---|---|---|
| Product: | [Community] GlusterFS | Reporter: | Vikas Gorur <vikas> |
| Component: | core | Assignee: | shishir gowda <sgowda> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | |
| Severity: | low | Docs Contact: | |
| Priority: | low | ||
| Version: | mainline | CC: | amarts, gluster-bugs, nsathyan, raghavendra, shehjart |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | Type: | --- | |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
|
Description
Vikas Gorur
2009-09-17 09:24:43 UTC
A single macro STACK_UNWIND_STRICT (<fop>, args ...) will do the job, where <fop> is the name of the FOP. PATCH: http://patches.gluster.com/patch/1666 in master (libglusterfs: Add STACK_UNWIND_STRICT macro.) PATCH: http://patches.gluster.com/patch/1667 in master (storage/posix: Change STACK_UNWIND to STACK_UNWIND_STRICT.) PATCH: http://patches.gluster.com/patch/1668 in master (features/locks: Change STACK_UNWIND to STACK_UNWIND_STRICT.) PATCH: http://patches.gluster.com/patch/1724 in master (cluster/afr: Change STACK_UNWIND to STACK_UNWIND_STRICT.) PATCH: http://patches.gluster.com/patch/1795 in master (cluster/dht: Change STACK_UNWIND to STACK_UNWIND_STRICT.) PATCH: http://patches.gluster.com/patch/1831 in master (performance/write-behind: Change STACK_UNWIND to STACK_UNWIND_STRICT.) This emacs-lisp script can help in doing the conversions:
(defconst fop-names '("stat" "readlink" "mknod" "mkdir" "unlink" "rmdir" "symlink" "rename" "link" "truncate" "open" "readv" "writev" "statfs" "flush" "fsync" "setxattr" "getxattr" "removexattr" "opendir" "getdents" "fsyncdir" "access" "create" "ftruncate" "fstat" "lk" "lookup" "setdents" "readdir" "inodelk" "finodelk" "entrylk" "fentrylk" "checksum" "xattrop" "fxattrop" "lock_notify" "lock_fnotify" "fgetxattr" "fsetxattr" "rchecksum" "setattr" "fsetattr" "readdirp"))
(defun fop-name (str)
(let (ret)
(dolist (name fop-names ret)
(if (string-match (concat ".*" name ".*")
str)
(setq ret name)))))
(defun vik-fop-name ()
(let ((def (c-defun-name)))
(fop-name def)))
(defun insert-fop-name ()
(interactive)
(insert (vik-fop-name)))
*** Bug 401 has been marked as a duplicate of this bug. *** PATCH: http://patches.gluster.com/patch/2333 in master (performance/stat-prefetch: use STACK_UNWIND_STRICT for unwinding.) PATCH: http://patches.gluster.com/patch/2334 in master (performance/io-cache: use STACK_UNWIND_STRICT for unwinding.) PATCH: http://patches.gluster.com/patch/2335 in master (performance/io-threads: use STACK_UNWIND_STRICT for unwinding.) PATCH: http://patches.gluster.com/patch/2336 in master (performance/read-ahead: use STACK_UNWIND_STRICT for unwinding.) PATCH: http://patches.gluster.com/patch/2337 in master (performance/write-behind: use STACK_UNWIND_STRICT for unwinding.) PATCH: http://patches.gluster.com/patch/2338 in master (performance/quick-read: use STACK_UNWIND_STRICT for unwinding.) PATCH: http://patches.gluster.com/patch/2680 in master (error-gen: change all STACK_UNWIND calls to STACK_UNWIND_STRICT) PATCH: http://patches.gluster.com/patch/2687 in master (trace: multiple fixes) Fix this in file by file manner, not in one big patch.. can be done between other fixes.. cluster/afr AFR_STACK_UNWIND in turn calls STACK_UNWIND_STRICT cluster/dht DHT_STACK_UNWIND in turn calls STACK_UNWIND_STRICT amar@supernova:~/work/glusterfs.git/xlators$ grep 'STACK_UNWIND ' * -r -l | grep -v afr | grep -v dht cluster/ha/src/ha.c cluster/unify/src/unify.h cluster/unify/src/unify-self-heal.c cluster/unify/src/unify.c cluster/map/src/map.c debug/io-stats/src/io-stats.c debug/error-gen/src/error-gen.c encryption/rot-13/src/rot-13.c features/path-convertor/src/path.c features/filter/src/filter.c features/quota/src/quota.c features/trash/src/trash.c features/trash/src/trash.h features/locks/src/common.c features/locks/src/posix.c meta/src/misc.c meta/src/view.c meta/src/meta.c mgmt/glusterd/src/glusterd-handler.c performance/stat-prefetch/src/stat-prefetch.c performance/symlink-cache/src/symlink-cache.c performance/write-behind/src/write-behind.c performance/quick-read/src/quick-read.c protocol/legacy/client/src/client-protocol.c storage/bdb/src/bdb.c Out of this, only below files are in build in 'master' debug/io-stats/src/io-stats.c debug/error-gen/src/error-gen.c encryption/rot-13/src/rot-13.c features/filter/src/filter.c features/quota/src/quota.c features/trash/src/trash.c features/trash/src/trash.h features/locks/src/common.c features/locks/src/posix.c mgmt/glusterd/src/glusterd-handler.c performance/stat-prefetch/src/stat-prefetch.c performance/symlink-cache/src/symlink-cache.c performance/write-behind/src/write-behind.c performance/quick-read/src/quick-read.c We need to fix above files. (preferably one at a time) PATCH: http://patches.gluster.com/patch/3753 in master (debug/* Change STACK_UNWIND TO STACK_UNWIND_STRICT) PATCH: http://patches.gluster.com/patch/3794 in master (features/trash convert STACK_UNWIND TO STACK_UNWIND STRICT) PATCH: http://patches.gluster.com/patch/3795 in master (features/locks convert STACK_UNWIND to STACK_UNWIND_STRICT) PATCH: http://patches.gluster.com/patch/3796 in master (performance/stat-prefetch convert STACK_UNWIND TO STACK_UNWIND_STRICT) PATCH: http://patches.gluster.com/patch/3797 in master (performance/symlink-cache convert STACK_UNWIND to STACK_UNWIND_STRICT) PATCH: http://patches.gluster.com/patch/3768 in master (encryption/ features/quota change STACK_UNWIND to STACK_UNWIND_STRICT) |