summaryrefslogtreecommitdiffstats
path: root/fs
Commit message (Collapse)AuthorAgeFilesLines
* ocfs2: Remove masklog ML_BH_IO.Tao Ma2011-02-244-26/+59
| | | | | | | | Remove mlog(0,...) and mlog(ML_BH_IO,...) from fs/ocfs2/buffer_head_io.c. The masklog BH_IO is removed finally. Signed-off-by: Tao Ma <boyu.mt@taobao.com>
* ocfs2: Remove masklog ML_JOURNAL.Tao Ma2011-02-244-78/+153
| | | | | | Remove mlog(0) from fs/ocfs2/journal.c and the masklog JOURNAL. Signed-off-by: Tao Ma <boyu.mt@taobao.com>
* ocfs2: Remove masklog ML_EXPORT.Tao Ma2011-02-244-30/+101
| | | | | | Remove mlog(0) from fs/ocfs2/export.c and the masklog EXPORT. Signed-off-by: Tao Ma <boyu.mt@taobao.com>
* ocfs2: Remove masklog ML_DCACHE.Tao Ma2011-02-234-24/+121
| | | | | | Remove mlog(0) from fs/ocfs2/dcache.c and the masklog DCACHE. Signed-off-by: Tao Ma <boyu.mt@taobao.com>
* ocfs2: Remove masklog ML_NAMEI.Tao Ma2011-02-234-71/+292
| | | | | | Remove mlog(0) from fs/ocfs2/namei.c and the masklog NAMEI finally. Signed-off-by: Tao Ma <boyu.mt@taobao.com>
* ocfs2: Remove mlog(0) from fs/ocfs2/dir.cTao Ma2011-02-232-46/+153
| | | | | | This is the 2nd step to remove the debug info of NAMEI. Signed-off-by: Tao Ma <boyu.mt@taobao.com>
* ocfs2: remove NAMEI from symlink.cTao Ma2011-02-211-1/+0
| | | | | | No mlog(0,...) in symlink.c, so just remove NAMEI. Signed-off-by: Tao Ma <boyu.mt@taobao.com>
* ocfs2: Remove masklog ML_QUOTA.Tao Ma2011-02-234-14/+90
| | | | | | | Remove mlog(0) from fs/ocfs2/quota_global.c and the masklog QUOTA. Signed-off-by: Tao Ma <boyu.mt@taobao.com>
* ocfs2: Remove mlog(0) from quota_local.c.Tao Ma2011-02-232-6/+17
| | | | | | Remove mlog(0) from fs/ocfs2/quota_local.c. Signed-off-by: Tao Ma <boyu.mt@taobao.com>
* ocfs2: Remove masklog ML_RESERVATIONS.Tao Ma2011-02-234-33/+142
| | | | | | Remove mlog(0) from fs/ocfs2/reservations.c and the masklog RESERVATIONS. Signed-off-by: Tao Ma <boyu.mt@taobao.com>
* ocfs2: Remove masklog ML_XATTR.Tao Ma2011-02-234-80/+239
| | | | | | Remove mlog(0) from fs/ocfs2/xattr.c and the masklog ML_XATTR. Signed-off-by: Tao Ma <boyu.mt@taobao.com>
* ocfs2: Remove masklog ML_SUPER.Tao Ma2011-02-234-21/+118
| | | | | | Remove mlog(0) from fs/ocfs2/super.c and the masklog SUPER. Signed-off-by: Tao Ma <boyu.mt@taobao.com>
* ocfs2: Remove mlog(0) from fs/ocfs2/heartbeat.cTao Ma2011-02-232-2/+9
| | | | | | | This is the 2nd step to remove the debug info of SUPER. Signed-off-by: Tao Ma <boyu.mt@taobao.com>
* ocfs2: Remove mlog(0) from fs/ocfs2/slot_map.cTao Ma2011-02-222-8/+16
| | | | | | This is the 1st step to remove the debug info of SUPER. Signed-off-by: Tao Ma <boyu.mt@taobao.com>
* ocfs2: Remove masklog ML_EXTENT_MAP.Tao Ma2011-02-224-5/+31
| | | | | | Remove mlog(0) from fs/ocfs2/extent_map.c and the masklog EXTENT_MAP. Signed-off-by: Tao Ma <boyu.mt@taobao.com>
* ocfs2: Remove masklog ML_INODE.Tao Ma2011-02-224-63/+182
| | | | | | Remove mlog(0) from fs/ocfs2/inode.c and the masklog INODE. Signed-off-by: Tao Ma <boyu.mt@taobao.com>
* ocfs2: Little refactoring against ocfs2_iget.Tao Ma2011-02-211-5/+5
| | | | | | | | | | ocfs2_iget is used to get/create inode. Only iget5_locked will give us an inode = NULL. So move this check ahead of ocfs2_read_locked_inode so that we don't need to check inode before we read and unlock inode. This is also helpful for trace event(see the next patch). Signed-off-by: Tao Ma <boyu.mt@taobao.com>
* ocfs2: Remove mlog(0) from fs/ocfs2/file.cTao Ma2011-02-223-98/+330
| | | | | | | This is the 2nd step to remove the debug info of INODE. Signed-off-by: Tao Ma <boyu.mt@taobao.com>
* ocfs2: remove INODE from unused files.Tao Ma2011-02-213-3/+0
| | | | | | | | As there are no such debug information in fs/ocfs2/ioctl.c, fs/ocfs2/locks.c and fs/ocfs2/sysfile.c, ML_INODE are also removed. Signed-off-by: Tao Ma <boyu.mt@taobao.com>
* ocfs2: Remove FILE_IO from masklog.Tao Ma2011-02-224-6/+28
| | | | | | | Change all the "mlog(0," in fs/ocfs2/mmap.c to trace events. And finally remove masklog FILE_IO. Signed-off-by: Tao Ma <boyu.mt@taobao.com>
* ocfs2: Remove mlog(0) from fs/ocfs2/aops.cTao Ma2011-02-222-26/+153
| | | | | | Remove all the "mlog(0," in fs/ocfs2/aops.c. Signed-off-by: Tao Ma <boyu.mt@taobao.com>
* ocfs2: Remove masklog ML_REFCOUNT.Tao Ma2011-02-224-82/+341
| | | | | | | Change all the "mlog(0," in fs/ocfs2/refcounttree.c to trace events. And finally remove masklog ML_REFCOUNT. Signed-off-by: Tao Ma <boyu.mt@taobao.com>
* ocfs2: Remove DISK_ALLOC from masklog.Tao Ma2011-02-226-6/+0
| | | | | | | | Since all 4 files, localalloc.c, suballoc.c, alloc.c and resize.c, which use DISK_ALLOC are changed to trace events, Remove masklog DISK_ALLOC totally. Signed-off-by: Tao Ma <boyu.mt@taobao.com>
* ocfs2: Remove mlog(0) from fs/ocfs2/suballoc.cTao Ma2011-02-222-5/+17
| | | | | | | This is the 4th step to remove the debug info of DISK_ALLOC. Signed-off-by: Tao Ma <boyu.mt@taobao.com>
* ocfs2: Remove mlog(0) from fs/ocfs2/suballoc.cTao Ma2011-02-222-54/+265
| | | | | | This is the 3rd step to remove the debug info of DISK_ALLOC. Signed-off-by: Tao Ma <boyu.mt@taobao.com>
* ocfs2: Remove mlog(0) from fs/ocfs2/localalloc.cTao Ma2011-02-222-34/+135
| | | | | | | | | | | | | | This is the 2nd step to remove the debug info of DISK_ALLOC. So this patch removes all mlog(0,...) from localalloc.c and adds the corresponding tracepoints. Different mlogs have different solutions. 1. Some are replaced with trace event directly. 2. Some are replaced while some new parameters are added. 3. Some are combined into one trace events. 4. Some redundant mlogs are removed. Signed-off-by: Tao Ma <boyu.mt@taobao.com>
* ocfs2: Remove mlog(0) from fs/ocfs2/alloc.cTao Ma2011-02-222-77/+452
| | | | | | | | | | | | | | | | | | | | | | This is the first try of replacing debug mlog(0,...) to trace events. Wengang has did some work in his original patch http://oss.oracle.com/pipermail/ocfs2-devel/2009-November/005513.html But he didn't finished it. So this patch removes all mlog(0,...) from alloc.c and adds the corresponding trace events. Different mlogs have different solutions. 1. Some are replaced with trace event directly. 2. Some are replaced and some new parameters are added since I think we need to know the btree owner in that case. 3. Some are combined into one trace events. 4. Some redundant mlogs are removed. What's more, it defines some event classes so that we can use them later. Cc: Wengang Wang <wen.gang.wang@oracle.com> Signed-off-by: Tao Ma <boyu.mt@taobao.com>
* ocfs2: Add ocfs2_trace.h.Wengang Wang2011-02-212-0/+19
| | | | | | | | | | | | | | About one year ago, Wengang Wang tried some first steps to add tracepoints to ocfs2. Hiss original patch is here: http://oss.oracle.com/pipermail/ocfs2-devel/2009-November/005512.html But as Steven Rostedt indicated in his article http://lwn.net/Articles/383362/, we'd better have our trace files resides in fs/ocfs2, so I rewrited the patch using the method Steven mentioned in that article. Signed-off-by: Wengang Wang <wen.gang.wang@oracle.com> Signed-off-by: Tao Ma <boyu.mt@taobao.com>
* ocfs2: Remove EXIT from masklog.Tao Ma2011-03-0727-315/+159
| | | | | | | | | | | | | | | | | | mlog_exit is used to record the exit status of a function. But because it is added in so many functions, if we enable it, the system logs get filled up quickly and cause too much I/O. So actually no one can open it for a production system or even for a test. This patch just try to remove it or change it. So: 1. if all the error paths already use mlog_errno, it is just removed. Otherwise, it will be replaced by mlog_errno. 2. if it is used to print some return value, it is replaced with mlog(0,...). mlog_exit_ptr is changed to mlog(0. All those mlog(0,...) will be replaced with trace events later. Signed-off-by: Tao Ma <boyu.mt@taobao.com>
* ocfs2: Remove ENTRY from masklog.Tao Ma2011-02-2131-418/+161
| | | | | | | | | | | | | | ENTRY is used to record the entry of a function. But because it is added in so many functions, if we enable it, the system logs get filled up quickly and cause too much I/O. So actually no one can open it for a production system or even for a test. So for mlog_entry_void, we just remove it. for mlog_entry(...), we replace it with mlog(0,...), and they will be replace by trace event later. Signed-off-by: Tao Ma <boyu.mt@taobao.com>
* Merge branch 'for-linus' of ↵Linus Torvalds2011-03-1533-1076/+1337
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: (57 commits) tidy the trailing symlinks traversal up Turn resolution of trailing symlinks iterative everywhere simplify link_path_walk() tail Make trailing symlink resolution in path_lookupat() iterative update nd->inode in __do_follow_link() instead of after do_follow_link() pull handling of one pathname component into a helper fs: allow AT_EMPTY_PATH in linkat(), limit that to CAP_DAC_READ_SEARCH Allow passing O_PATH descriptors via SCM_RIGHTS datagrams readlinkat(), fchownat() and fstatat() with empty relative pathnames Allow O_PATH for symlinks New kind of open files - "location only". ext4: Copy fs UUID to superblock ext3: Copy fs UUID to superblock. vfs: Export file system uuid via /proc/<pid>/mountinfo unistd.h: Add new syscalls numbers to asm-generic x86: Add new syscalls for x86_64 x86: Add new syscalls for x86_32 fs: Remove i_nlink check from file system link callback fs: Don't allow to create hardlink for deleted file vfs: Add open by file handle support ...
| * tidy the trailing symlinks traversal upAl Viro2011-03-151-45/+26
| | | | | | | | | | | | | | | | | | | | * pull the handling of current->total_link_count into __do_follow_link() * put the common "do ->put_link() if needed and path_put() the link" stuff into a helper (put_link(nd, link, cookie)) * rename __do_follow_link() to follow_link(), while we are at it Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * Turn resolution of trailing symlinks iterative everywhereAl Viro2011-03-151-54/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The last remaining place (resolution of nested symlink) converted to the loop of the same kind we have in path_lookupat() and path_openat(). Note that we still *do* have a recursion in pathname resolution; can't avoid it, really. However, it's strictly for nested symlinks now - i.e. ones in the middle of a pathname. link_path_walk() has lost the tail now - it always walks everything except the last component. do_follow_link() renamed to nested_symlink() and moved down. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * simplify link_path_walk() tailAl Viro2011-03-151-7/+1
| | | | | | | | | | | | | | | | | | | | | | Now that link_path_walk() is called without LOOKUP_PARENT only from do_follow_link(), we can simplify the checks in last component handling. First of all, checking if we'd arrived to a directory is not needed - the caller will check it anyway. And LOOKUP_FOLLOW is guaranteed to be there, since we only get to that place with nd->depth > 0. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * Make trailing symlink resolution in path_lookupat() iterativeAl Viro2011-03-151-10/+53
| | | | | | | | | | | | | | Now the only caller of link_path_walk() that does *not* pass LOOKUP_PARENT is do_follow_link() Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * update nd->inode in __do_follow_link() instead of after do_follow_link()Al Viro2011-03-151-3/+2
| | | | | | | | | | | | ... and note that we only need to do it for LAST_BIND symlinks Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * pull handling of one pathname component into a helperAl Viro2011-03-151-68/+55
| | | | | | | | | | | | | | | | | | | | new helper: walk_component(). Handles everything except symlinks; returns negative on error, 0 on success and 1 on symlinks we decided to follow. Drops out of RCU mode on such symlinks. link_path_walk() and do_last() switched to using that. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * fs: allow AT_EMPTY_PATH in linkat(), limit that to CAP_DAC_READ_SEARCHAneesh Kumar K.V2011-03-151-4/+16
| | | | | | | | | | | | | | | | We don't want to allow creation of private hardlinks by different application using the fd passed to them via SCM_RIGHTS. So limit the null relative name usage in linkat syscall to CAP_DAC_READ_SEARCH Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
| * Allow passing O_PATH descriptors via SCM_RIGHTS datagramsAl Viro2011-03-151-0/+2
| | | | | | | | | | | | | | | | Just need to make sure that AF_UNIX garbage collector won't confuse O_PATHed socket on filesystem for real AF_UNIX opened socket. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * readlinkat(), fchownat() and fstatat() with empty relative pathnamesAl Viro2011-03-152-6/+11
| | | | | | | | | | | | | | | | | | For readlinkat() we simply allow empty pathname; it will fail unless we have dfd equal to O_PATH-opened symlink, so we are outside of POSIX scope here. For fchownat() and fstatat() we allow AT_EMPTY_PATH; let the caller explicitly ask for such behaviour. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * Allow O_PATH for symlinksAl Viro2011-03-151-6/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At that point we can't do almost nothing with them. They can be opened with O_PATH, we can manipulate such descriptors with dup(), etc. and we can see them in /proc/*/{fd,fdinfo}/*. We can't (and won't be able to) follow /proc/*/fd/* symlinks for those; there's simply not enough information for pathname resolution to go on from such point - to resolve a symlink we need to know which directory does it live in. We will be able to do useful things with them after the next commit, though - readlinkat() and fchownat() will be possible to use with dfd being an O_PATH-opened symlink and empty relative pathname. Combined with open_by_handle() it'll give us a way to do realink-by-handle and lchown-by-handle without messing with more redundant syscalls. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * New kind of open files - "location only".Al Viro2011-03-154-17/+110
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | New flag for open(2) - O_PATH. Semantics: * pathname is resolved, but the file itself is _NOT_ opened as far as filesystem is concerned. * almost all operations on the resulting descriptors shall fail with -EBADF. Exceptions are: 1) operations on descriptors themselves (i.e. close(), dup(), dup2(), dup3(), fcntl(fd, F_DUPFD), fcntl(fd, F_DUPFD_CLOEXEC, ...), fcntl(fd, F_GETFD), fcntl(fd, F_SETFD, ...)) 2) fcntl(fd, F_GETFL), for a common non-destructive way to check if descriptor is open 3) "dfd" arguments of ...at(2) syscalls, i.e. the starting points of pathname resolution * closing such descriptor does *NOT* affect dnotify or posix locks. * permissions are checked as usual along the way to file; no permission checks are applied to the file itself. Of course, giving such thing to syscall will result in permission checks (at the moment it means checking that starting point of ....at() is a directory and caller has exec permissions on it). fget() and fget_light() return NULL on such descriptors; use of fget_raw() and fget_raw_light() is needed to get them. That protects existing code from dealing with those things. There are two things still missing (they come in the next commits): one is handling of symlinks (right now we refuse to open them that way; see the next commit for semantics related to those) and another is descriptor passing via SCM_RIGHTS datagrams. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * ext4: Copy fs UUID to superblockAneesh Kumar K.V2011-03-151-0/+2
| | | | | | | | | | | | | | | | File system UUID is made available to application via /proc/<pid>/mountinfo Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * ext3: Copy fs UUID to superblock.Aneesh Kumar K.V2011-03-151-0/+1
| | | | | | | | | | | | | | | | File system UUID is made available to application via /proc/<pid>/mountinfo Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * vfs: Export file system uuid via /proc/<pid>/mountinfoAneesh Kumar K.V2011-03-151-0/+16
| | | | | | | | | | | | | | | | We add a per superblock uuid field. File systems should update the uuid in the fill_super callback Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * fs: Remove i_nlink check from file system link callbackAneesh Kumar K.V2011-03-156-42/+0
| | | | | | | | | | | | | | | | Now that VFS check for inode->i_nlink == 0 and returns proper error, remove similar check from file system Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * fs: Don't allow to create hardlink for deleted fileAneesh Kumar K.V2011-03-151-1/+5
| | | | | | | | | | | | | | | | | | | | | | Add inode->i_nlink == 0 check in VFS. Some of the file systems do this internally. A followup patch will remove those instance. This is needed to ensure that with link by handle we don't allow to create hardlink of an unlinked file. The check also prevent a race between unlink and link Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * vfs: Add open by file handle supportAneesh Kumar K.V2011-03-154-0/+176
| | | | | | | | | | | | | | [AV: duplicate of open() guts removed; file_open_root() used instead] Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * vfs: Add name to file handle conversion supportAneesh Kumar K.V2011-03-153-1/+110
| | | | | | | | | | | | | | | | | | The syscall also return mount id which can be used to lookup file system specific information such as uuid in /proc/<pid>/mountinfo Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
| * New AT_... flag: AT_EMPTY_PATHAl Viro2011-03-141-10/+19
| | | | | | | | | | | | | | | | | | | | For name_to_handle_at(2) we'll want both ...at()-style syscall that would be usable for non-directory descriptors (with empty relative pathname). Introduce new flag (AT_EMPTY_PATH) to deal with that and corresponding LOOKUP_EMPTY; teach user_path_at() and path_init() to deal with the latter. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
OpenPOWER on IntegriCloud