summaryrefslogtreecommitdiffstats
path: root/xlators/storage/posix/src/posix.c
Commit message (Collapse)AuthorAgeFilesLines
* storage/posix: Set op_ret to -1 when open fails.Vikas Gorur2010-02-061-0/+1
| | | | | | | | | | | Thanks to Jeff Darcy <jdarcy@redhat.com> for the bug report and the patch. Signed-off-by: Vikas Gorur <vikas@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 581 (posix_open does not report open(2) failures correctly) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=581
* storage/posix: prevent double close of fds resulting in EBADF errors.Pavan Sondur2010-01-091-0/+2
| | | | | | | | Signed-off-by: Pavan Vilas Sondur <pavan@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 112 (parallel deletion of files mounted by different clients on the same back-end hangs and/or does not completely delete) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=112
* storage/posix: Fix condition typo.Vikas Gorur2009-11-201-1/+1
| | | | | | | | | | | Do comparison instead of assignment in if-condition in posix_link. Signed-off-by: Vikas Gorur <vikas@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 254 (storage/posix has to do inode number transformation wherever it unwinds with a stat structure) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=254
* segfault fix in posixAmar Tumballi2009-11-191-1/+3
| | | | | | | | | | | fd_ctx_get() was getting passed with wrong argument (type punned), and hence was getting segfaulted on 32bit systems. Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 383 (glusterfs server crash on 2.0.8) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=383
* storage/posix: Serialize do_xattrop.Vikas Gorur2009-10-291-45/+58
| | | | | | | | | | | | | Hold a lock on the inode for the getxattr/add-array/setxattr section since multiple threads can enter into it causing wrong values to be written and triggering spurious replicate self-heal later. Signed-off-by: Vikas Gorur <vikas@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 326 ([2.0.8rc9] Spurious self-heal) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=326
* storage/posix: Refactor xattropVikas Gorur2009-10-291-122/+64
| | | | | | | | | | Move common code into do_xattrop. Signed-off-by: Vikas Gorur <vikas@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 326 ([2.0.8rc9] Spurious self-heal) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=326
* change open flag to O_RDWR as ftruncate fails for a read only fdHarshavardhana Ranganath2009-10-291-1/+1
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 112 (parallel deletion of files mounted by different clients on the same back-end hangs and/or does not completely delete) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=112
* Changes in posix unlink and rmdir to prevent inode num re-use immediately.Pavan Sondur2009-10-161-6/+55
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 112 (parallel deletion of files mounted by different clients on the same back-end hangs and/or does not completely delete) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=112
* Changed occurrences of Z Research to Gluster.Vijay Bellur2009-10-071-1/+1
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* storage/posix: Process "glusterfs.content" key in lookup only for regular files.Vikas Gorur2009-10-061-1/+3
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 301 (lookup should ignore ISDIR error when trying to get content) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=301
* storage/posix: transform inode number in stat structureRaghavendra G2009-09-151-153/+489
| | | | | | | | | | - when export directory is configured to span across multiple mountpoints, the inode number has to be transformed in order to make it unique. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 254 (storage/posix has to do inode number transformation wherever it unwinds with a stat structure) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=254
* storage/posix: Handle setgid bit on directories correctlyVikas Gorur2009-09-081-10/+108
| | | | | | | | | | | If a directory has the setgid bit set, then any entry created under it must have group ownership same as the directory. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 241 (Gluster not honouring SETGID flag) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=241
* add check for making sure 'fd' belongs to directory in posix-readdirAmar Tumballi2009-08-041-0/+7
| | | | | | | | | | | The root cause of this error is not found yet. But this check will make sure that there is no crash when the situation happens. Segfault can happen when a readdir() call comes over file's fd. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 192 (sefault in posix-readdir) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=192
* posix_readdir: fill stat structure into dir entryAnand V. Avati2009-06-261-0/+23
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* posix: Fix build warning on incorrect typeShehjar Tikoo2009-05-161-1/+1
| | | | | | | | | This fixes a build warning due to use of incorrect type for size_t, for Core 2 Duo. Extra fix from avati: change %ld to GF_PRI_SIZET Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* log level fix in storage/posixAnand V. Avati2009-05-051-1/+1
|
* Cleaned up log messages in storage/posix.Vikas Gorur2009-05-051-181/+214
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* Remove log level TRACE and the macro GF_TRACE.Vikas Gorur2009-04-241-1/+1
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* posix: Ensure EINVAL return on NULL argsShehjar Tikoo2009-04-221-1/+1
| | | | | | | | | | Initing op_errno to EINVAL ensures that this is the value that gets returned on STACK_UNWIND, in case any of the VALIDATE macros result in exit from "out" due to a NULL argument. If this is not done , we get op_ret as -1 with errno set to 0 in the application's syscall. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* minor bug fix in posix_create() when 'o-direct enable' option is given.Amar Tumballi2009-04-141-1/+1
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* update storage/posix with new readv writev prototypesAnand V. Avati2009-04-121-92/+22
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* posix_unlink: make unlinking in background configurable through volume spec fileRaghavendra G2009-04-091-13/+36
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* fix to fd leak in posix_create() in case of some failures.Amar Tumballi2009-04-061-2/+3
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* Bug fix in posix-init(), when span-devices is set above 1Amar Tumballi2009-04-011-1/+1
| | | | | | removed the extra '!' in if statement, which was a typo earlier. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* posix_unlink - open/unlink/close only regular filesAnand V. Avati2009-03-261-7/+10
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* fix to rm of large file blocking other operations on the same directory ↵Raghavendra G2009-03-241-0/+15
| | | | | | | | | | | | | containing file (ref: rt #779) posix_unlink follows the below procedure to avoid client noticing delay during unlink of large file 1. open file 2. unlink file 3. stack_unwind 4. close file Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* fixed sys_<fops> related warnings. (on mac os x and opensolaris)Amar Tumballi2009-03-191-2/+2
| | | | | | The fix in posix will fix 'unresolved' symbol errors in Mac/Solaris/FreeBSD Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* afr data self heal bug fixAmar Tumballi2009-03-181-3/+3
| | | | | | fixes the issue of corrupting self-healed copy in AFR Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* Add system call abstraction layerVikas Gorur2009-03-171-22/+26
| | | | | | | | | - syscall.c provides platform-independent system calls - previous code for this from compat.c removed - posix xlator uses new functions from syscall.c - solaris_flistxattr added to compat.c Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* Add extra 'volume' parameter to inodelk/entrylk callsVikas Gorur2009-03-121-6/+6
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* feature to span the export directory across different mountpointsAmar Tumballi2009-03-101-8/+75
| | | | | | | | | This feature enables exported directory containing different mountpoints. With, 'option span-devices <n>' where n is number of different mountpoints export directories can have, one can enable this feature. By default the number will be 1, and the inode scaling won't come into picture. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* added fgetxattr and fsetxattr FOPsVikas Gorur2009-03-071-0/+223
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* updated copyright header to extend copyright upto 2009Basavanagowda Kanur2009-02-261-1/+1
| | | | | | updated copyright header to include 2009. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* Deleted xattr caching code from posix in anticipation of the xattr-cache ↵Vikas Gorur2009-02-231-91/+150
| | | | | | translator. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* posix_releasedir flush fds from xattrcache.Anand V. Avati2009-02-221-0/+4
| | | | | | | | It would have entered cache in setdents. Proposed fix for: http://zresearch.com/pipermail/gluster-users/2009-February/001621.html Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* Added all filesVikas Gorur2009-02-181-0/+3715