summaryrefslogtreecommitdiffstats
path: root/xlators/storage
Commit message (Collapse)AuthorAgeFilesLines
* storage/posix: Set right the op_ret value from posix_readlink()Vijay Bellur2009-10-181-4/+6
| | | | | | | | | | Since op_ret was being returned as 0, fuse would regard the readlink () as a failure. Also, set right the buffer size of gen_key in posix_{f, l}stat_with_gen. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 315 (generation number support) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=315
* posix: posix_{f, l}stat_with_gen to return 0 on success (instead of >= 0)Anand V. Avati2009-10-161-0/+2
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 315 (generation number support) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=315
* posix - generation number supportAnand V. Avati2009-10-162-294/+229
| | | | | | | | | | - use sequential gen counter - move span_devices handling and generation assignment to common functions Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 315 (generation number support) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=315
* posix - use lchown and lchmod in setattrAnand V. Avati2009-10-161-2/+2
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 315 (generation number support) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=315
* storage/posix: Use the right macro to set nsec of mtime in posix_do_utimesVijay Bellur2009-10-151-1/+1
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 296 (handle futimes correctly in FUSE) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=296
* storage/posix: Initialize op_errno to 0 in posix_create.Vijay Bellur2009-10-151-1/+1
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 309 (In replicate set-up when exnihilate.sh is run , client crashes.) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=309
* posix/client/server: Send postparent in lookup even if lookup fails on the ↵Vikas Gorur2009-10-131-2/+6
| | | | | | | | | entry itself. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 137 (Parent directory mtime not reset after a create in self-heal) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=137
* posix: Ensure ENOTEMPTY return on rmdirShehjar Tikoo2009-10-091-1/+4
| | | | | | | | | | | | | | | Since we added an extra step after rmdir, i.e. the lstat on parent dir as part of the NFS-friendly changes, the successful return from postparent lstat clobbers the -1 error return from rmdir. This prevents this particularly ENOTEMPTY error from being propagated to higher translators. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 145 (NFSv3 related additions to 2.1 task list) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=145
* Changed occurrences of Z Research to Gluster.Vijay Bellur2009-10-076-6/+6
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* posix: Support readdirp fopShehjar Tikoo2009-10-061-16/+38
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 292 (Separate readdirp functionality from readdir fop) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=292
* 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: Change STACK_UNWIND to STACK_UNWIND_STRICT.Vikas Gorur2009-10-051-49/+59
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 269 (Add a specialized STACK_UNWIND macro for each FOP) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=269
* posix: NFS-friendly logic changesShehjar Tikoo2009-10-012-26/+394
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 145 (NFSv3 related additions to 2.1 task list) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=145
* Global: NFS-friendly prototype changesShehjar Tikoo2009-10-012-2/+3
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 145 (NFSv3 related additions to 2.1 task list) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=145
* Global: Introduce setattr and fsetattr fopsShehjar Tikoo2009-10-012-488/+382
| | | | | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 146 (Add setattr FOP) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=146
* storage/posix: Implement rchecksum.Vikas Gorur2009-09-221-0/+66
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* storage/posix: Update nr_files after system call succeeds.Vikas Gorur2009-09-221-12/+12
| | | | | | | | | | In posix_open(), posix_create(), and posix_close(), update stats->nr_files only after the FOP has succeeded. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 248 (Updating stats in posix is incorrect) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=248
* storage/posix: transform inode number in stat structureRaghavendra G2009-09-151-133/+446
| | | | | | | | | | - 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: Synchronize access to this->private.Vikas Gorur2009-09-082-23/+52
| | | | | | | | | Hold lock on priv while updating variables inside it. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 175 (Statistics for number of open files in Posix incorrect) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=175
* 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
* storage/posix: handle dentries from different mount points in readdirRaghavendra G2009-09-081-34/+51
| | | | | | | | | | | | | | | | | - If posix translator is configured to have export directories to span accross different mount points, inode number is transformed in the dentry returned. Otherwise, the entry is not added to list of entries returned in readdir callback. - storage/posix returns ENOENT if the file is on different mount point other than that of exported directory and is not configured for export directory spanning across multiple mountpoints during lookup. But, since stat-prefetch shortcuts lookup calls, its necessary that readdir return only valid dentries. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 221 (stat prefetch implementation) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=221
* TAKE2[PATCH BUG:213 1/1] Support for Process State DumpVijay Bellur2009-08-191-0/+45
| | | | | | | | | Support for process state dump. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 213 (Support for process state dump) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=213
* 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 getxattr supports new key 'trusted.glusterfs.location'Amar Tumballi2009-07-202-0/+24
| | | | | | | | | | which can be used to get the file location by 'hostname' of the machine where file resides. Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 131 (provide a way to get the file location in clustered storage) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=131
* storage/bdb - replace ZR_FILENAME_MAX by NAME_MAXBasavanagowda Kanur2009-07-061-2/+2
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* storage/posix - replace ZR_FILENAME_MAX by NAME_MAXBasavanagowda Kanur2009-07-061-2/+2
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* posix_readdir: fill stat structure into dir entryAnand V. Avati2009-06-261-0/+23
| | | | Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
* Do stat to check mode of the export directory in storage/posix.Vikas Gorur2009-06-151-1/+1
| | | | | | | Doing an lstat means init fails if the export directory is a symlink pointing to a directory. 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>
* fix bdb_db_get() to return exactly read bytes and to copy the read data to ↵Basavanagowda Kanur2009-04-232-10/+18
| | | | | | given buffer only when needed. 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>
* changes to database read interface, to make use of a given buffer instead of ↵Basavanagowda Kanur2009-04-133-79/+100
| | | | | | allocating internally. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* log formatting fixes. use GF_PRI_SIZET for size_t.Basavanagowda Kanur2009-04-131-22/+32
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* prefix ULL to large constants (to fix bdb build warning)Anand V. Avati2009-04-121-2/+2
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* update storage/bdb with new readv writev prototypesAnand V. Avati2009-04-121-71/+26
| | | | 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-092-13/+44
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* introduction of secondary index database in storage/bdbBasavanagowda Kanur2009-04-084-1523/+2019
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* link() & rename() on storage/bdb will always return EXDEV.Basavanagowda Kanur2009-04-083-353/+2
| | | | Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
* storage/bdb untabify, code alignment to limit to 80 characters per line.Basavanagowda Kanur2009-04-084-4409/+4566
| | | | 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 ↵2.0.0rc7Raghavendra 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)2.0.0rc5Amar 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>
* Moving few translators which are not well tested, are in beta stage to ↵Amar Tumballi2009-03-181-1/+1
| | | | | | | | | | | | | 'testing/' directory. This way, users will be aware which are in 'beta' stage, and we can keep on adding new translators (if any) seemlessly to stable codebase and once tested can move them to proper places. To use these translators, everyone will have to prefix 'testing/' to existing type of translator (in volumefile) Signed-off-by: Anand V. Avati <avati@amp.gluster.com>