- 22 5月, 2010 24 次提交
-
-
由 Jan Kara 提交于
There is no need to map offset of local dquot structure to on disk block in each quota write. It is enough to map it just once and store the physical block number in quota structure in memory. Moreover this simplifies locking as we do not have to take ip_alloc_sem from quota write path. Acked-by: NJoel Becker <Joel.Becker@oracle.com> Signed-off-by: NJan Kara <jack@suse.cz>
-
由 Jan Kara 提交于
Currently, __dquot_transfer() acquires its own references of dquot structures that will be put into inode. But for OCFS2, this creates a lock inversion between dq_lock (waited on in dqget) and transaction start (started in ocfs2_setattr). Currently, deadlock is impossible because dq_lock is acquired only during dquot_acquire and dquot_release and we already hold a reference to dquot structures in ocfs2_setattr so neither of these functions can be called while we call dquot_transfer. But this is rather subtle and it is hard to teach lockdep about it. So provide __dquot_transfer function that can be passed dquot references directly. OCFS2 can then pass acquired dquot references directly to __dquot_transfer with proper locking. Signed-off-by: NJan Kara <jack@suse.cz>
-
由 Dmitry Monakhov 提交于
Quota must being initialized if size or uid/git changes requested. But initialization performed in two different places: in case of i_size file system is responsible for dquot init , but in case of uid/gid init will be called internally in dquot_transfer(). This ambiguity makes code harder to understand. Let's move this logic to one common helper function. Signed-off-by: NDmitry Monakhov <dmonakhov@openvz.org> Signed-off-by: NJan Kara <jack@suse.cz>
-
由 Christoph Hellwig 提交于
The methods already do these checks, so remove them in the quotactl implementation to allow non-VFS quota implementations to also support these calls. Signed-off-by: NChristoph Hellwig <hch@lst.de> Signed-off-by: NJan Kara <jack@suse.cz>
-
由 Christoph Hellwig 提交于
Pass the larger struct fs_disk_quota to the ->set_dqblk operation so that the Q_SETQUOTA and Q_XSETQUOTA operations can be implemented with a single filesystem operation and we can retire the ->set_xquota operation. The additional information (RT-subvolume accounting and warn counts) are left zero for the VFS quota implementation. Add new fieldmask values for setting the numer of blocks and inodes values which is required for the VFS quota, but wasn't for XFS. Signed-off-by: NChristoph Hellwig <hch@lst.de> Signed-off-by: NJan Kara <jack@suse.cz>
-
由 Christoph Hellwig 提交于
Pass the larger struct fs_disk_quota to the ->get_dqblk operation so that the Q_GETQUOTA and Q_XGETQUOTA operations can be implemented with a single filesystem operation and we can retire the ->get_xquota operation. The additional information (RT-subvolume accounting and warn counts) are left zero for the VFS quota implementation. Signed-off-by: NChristoph Hellwig <hch@lst.de> Signed-off-by: NJan Kara <jack@suse.cz>
-
由 Eric Sandeen 提交于
ext4 was updated to accept barrier/nobarrier mount options in addition to the older barrier=0/1. The barrier story is complex enough, we should help people by making the options the same at least, even if the defaults are different. This patch allows the barrier/nobarrier mount options for ext3, while keeping nobarrier the default. It also unconditionally displays barrier status in show_options, and prints a message at mount time if barriers are not enabled, just as ext4 does. Signed-off-by: NEric Sandeen <sandeen@redhat.com> Signed-off-by: NJan Kara <jack@suse.cz>
-
由 Dmitry Monakhov 提交于
Quota stats is mostly writable data structure. Let's alloc percpu bucket for each value. NOTE: dqstats_read() function is racy against dqstats_{inc,dec} and may return inconsistent value. But this is ok since absolute accuracy is not required. Signed-off-by: NDmitry Monakhov <dmonakhov@openvz.org> Signed-off-by: NJan Kara <jack@suse.cz>
-
由 Sergey Senozhatsky 提交于
Suppress compilation warning: "quotatypes" defined but not used. quotatypes is used only when CONFIG_QUOTA_DEBUG or CONFIG_PRINT_QUOTA_WARNING is/are defined. Signed-off-by: NSergey Senozhatsky <sergey.senozhatsky@gmail.com> Signed-off-by: NJan Kara <jack@suse.cz>
-
由 Jan Kara 提交于
log_start_commit() returns 1 only when it started a transaction commit. Thus in case transaction commit is already running, we fail to wait for the commit to finish. Fix the issue by always waiting for the commit regardless of the log_start_commit return value. Signed-off-by: NJan Kara <jack@suse.cz>
-
由 Jan Kara 提交于
Provide a function which returns whether a transaction with given tid will send a barrier to the filesystem device. The function will be used by ext3 to detect whether fsync needs to send a separate barrier or not. Signed-off-by: NJan Kara <jack@suse.cz>
-
由 Dmitry Monakhov 提交于
generic setattr not longer responsible for quota transfer. use ufs_setattr for all ufs's inodes. Signed-off-by: NDmitry Monakhov <dmonakhov@openvz.org> Signed-off-by: NJan Kara <jack@suse.cz>
-
由 Jan Blunck 提交于
The BKL is still used in ext2_put_super(), ext2_fill_super(), ext2_sync_fs() ext2_remount() and ext2_write_inode(). From these calls ext2_put_super(), ext2_fill_super() and ext2_remount() are protected against each other by the struct super_block s_umount rw semaphore. The call in ext2_write_inode() could only protect the modification of the ext2_sb_info through ext2_update_dynamic_rev() against concurrent ext2_sync_fs() or ext2_remount(). ext2_fill_super() and ext2_put_super() can be left out because you need a valid filesystem reference in all three cases, which you do not have when you are one of these functions. If the BKL is only protecting the modification of the ext2_sb_info it can safely be removed since this is protected by the struct ext2_sb_info s_lock. Signed-off-by: NJan Blunck <jblunck@suse.de> Cc: Jan Kara <jack@suse.cz> Signed-off-by: NJan Kara <jack@suse.cz>
-
由 Jan Blunck 提交于
Add a spinlock that protects against concurrent modifications of s_mount_state, s_blocks_last, s_overhead_last and the content of the superblock's buffer pointed to by sbi->s_es. The spinlock is now used in ext2_xattr_update_super_block() which was setting the EXT2_FEATURE_COMPAT_EXT_ATTR flag on the superblock without protection before. Likewise the spinlock is used in ext2_show_options() to have a consistent view of the mount options. This is a preparation patch for removing the BKL from ext2 in the next patch. Signed-off-by: NJan Blunck <jblunck@suse.de> Cc: Andi Kleen <andi@firstfloor.org> Cc: Jan Kara <jack@suse.cz> Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Signed-off-by: NJan Kara <jack@suse.cz>
-
由 Jan Blunck 提交于
Move ext2_write_super() out of ext2_setup_super() as a preparation for the next patch that adds a new lock for superblock fields. Signed-off-by: NJan Blunck <jblunck@suse.de> Signed-off-by: NJan Kara <jack@suse.cz>
-
由 Jan Blunck 提交于
Both function originally did similar things except that ext2_sync_super() is returning after the call to sync_dirty_buffer(sbh). Therefore this patch adds a wait flag to tell ext2_sync_super() if it has to call sync_dirty_buffer() to wait for in-progress I/O to finish. Signed-off-by: NJan Blunck <jblunck@suse.de> Signed-off-by: NJan Kara <jack@suse.cz>
-
由 Jan Blunck 提交于
Depending in the state (valid or unchecked) of the filesystem either ext2_sync_super() or ext2_commit_super() is called. If the filesystem is currently valid (it is checked), we first mark it unchecked and afterwards duplicate the work that ext2_sync_super() is doing later. Therefore this patch removes the duplicate code and calls ext2_sync_super() directly after marking the filesystem unchecked. Signed-off-by: NJan Blunck <jblunck@suse.de> Signed-off-by: NJan Kara <jack@suse.cz>
-
由 Jan Blunck 提交于
This is probably a typo since the write time should actually be updated by ext2_sync_fs() instead of the mount time. Signed-off-by: NJan Blunck <jblunck@suse.de> Signed-off-by: NJan Kara <jack@suse.cz>
-
由 Jan Blunck 提交于
ext2_sync_fs() used to duplicate the code from ext2_clear_super_error(). Signed-off-by: NJan Blunck <jblunck@suse.de> Signed-off-by: NJan Kara <jack@suse.cz>
-
由 Dmitry Monakhov 提交于
Currently block/inode/dir counters are initialized before journal was recovered. In fact after journal recovery this info will probably change which results in incorrect numbers returned from statfs(2). BUG:#15768 Signed-off-by: NDmitry Monakhov <dmonakhov@openvz.org> Signed-off-by: NJan Kara <jack@suse.cz>
-
由 Francis Moreau 提交于
This patch removes a useless call to brelse(bitmap_bh) since at that point bitmap_bh is NULL and slightly cleans up bitmap_bh handling. Signed-off-by: NFrancis Moreau <francis.moro@gmail.com> Signed-off-by: NJan Kara <jack@suse.cz>
-
由 Dmitry Monakhov 提交于
- Skip locking if quota is dirty already. - Return old quota state to help fs-specciffic implementation to optimize case where quota was dirty already. Signed-off-by: NDmitry Monakhov <dmonakhov@openvz.org> Signed-off-by: NJan Kara <jack@suse.cz>
-
由 Jan Kara 提交于
There is no point in loading bitmap for groups which are completely full. This causes noticeable performance problems (and memory pressure) on small systems with large full filesystem (http://marc.info/?l=linux-ext4&m=126843108314310&w=2). Port of the same ext3 patch. Signed-off-by: NJan Kara <jack@suse.cz>
-
由 Frans van de Wiel 提交于
There is no point in loading bitmap for groups which are completely full. This causes noticeable performance problems (and memory pressure) on small systems with large full filesystem (http://marc.info/?l=linux-ext4&m=126843108314310&w=2). Jan Kara: Added a comment and changed check to use cpu-endian value. Signed-off-by: N"Frans van de Wiel" <fvdw@fvdw.eu> Signed-off-by: NJan Kara <jack@suse.cz>
-
- 21 5月, 2010 1 次提交
-
-
由 Michal Nazarewicz 提交于
This patch modifies the fs/timerfd.c to use the newly created wait_event_interruptible_locked_irq() macro. This replaces an open code implementation with a single macro call. Signed-off-by: NMichal Nazarewicz <m.nazarewicz@samsung.com> Cc: Kyungmin Park <kyungmin.park@samsung.com> Cc: Marek Szyprowski <m.szyprowski@samsung.com> Cc: Alexander Viro <viro@zeniv.linux.org.uk> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Roland Dreier <rolandd@cisco.com> Cc: Tejun Heo <tj@kernel.org> Cc: Christoph Lameter <cl@linux-foundation.org> Cc: Davide Libenzi <davidel@xmailserver.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
- 20 5月, 2010 4 次提交
-
-
由 Joakim Tjernlund 提交于
This is the culmination of this sequence of patches. By moving the block erasing from jffs2_write_super() into the GC code, we avoid huge latencies on unmount where it waits for _all_ pending blocks to be erased, and we allow better control for time-critical tasks by stopping the GC thread. Signed-off-by: NJoakim Tjernlund <joakim.tjernlund@transmode.se> Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
-
由 Joakim Tjernlund 提交于
Now that we do erases from GC and trigger the GC thread to do them instead of using kupdated, this function is misnamed. It's only used for triggering wbuf flush on NAND flash now. Rename it accordingly. Signed-off-by: NJoakim Tjernlund <joakim.tjernlund@transmode.se> Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
-
由 David Woodhouse 提交于
This is now done in a GC pass; we don't need to trigger kupdated to do it. Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
-
由 David Woodhouse 提交于
We're about to call this from a bunch of places which already hold c->erase_completion_lock, so add an assertion and change its existing callers to do the same. Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
-
- 19 5月, 2010 11 次提交
-
-
由 Joakim Tjernlund 提交于
Now that we trigger block erases from jffs2_garbage_collect_pass(), adjust jffs2_thread_should_wake() to return 1 when there are blocks to erase. Signed-off-by: NJoakim Tjernlund <joakim.tjernlund@transmode.se> Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
-
由 David Woodhouse 提交于
jffs2_garbage_collect_pass() would previously return -EAGAIN if it couldn't find anything to garbage collect from, and there were blocks on the erase_pending_list. If the blocks were actually in the process of being erased, though, then they wouldn't be on that list. Check for nr_erasing_blocks being non-zero instead. Fix jffs2_reserve_space() to wait for the in-progress erases to complete, when jffs2_garbage_collect_pass() returns -EAGAIN. And fix jffs2_erase_succeeded() to actually wake up the erase_wait wq that jffs2_reserve_space() is now using. Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
-
由 Joakim Tjernlund 提交于
We're about to start calling this from the jffs2_garbage_collect_pass(), and we'll want to know whether it actually did anything or not. Signed-off-by: NJoakim Tjernlund <joakim.tjernlund@transmode.se> Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
-
由 Christoph Hellwig 提交于
And also drop a useless argument to xfs_iomap_write_direct. Signed-off-by: NChristoph Hellwig <hch@lst.de> Signed-off-by: NAlex Elder <aelder@sgi.com>
-
由 Christoph Hellwig 提交于
Signed-off-by: NChristoph Hellwig <hch@lst.de> Signed-off-by: NAlex Elder <aelder@sgi.com>
-
由 Christoph Hellwig 提交于
Signed-off-by: NChristoph Hellwig <hch@lst.de> Signed-off-by: NAlex Elder <aelder@sgi.com>
-
由 Christoph Hellwig 提交于
Rename all iomap_valid identifiers to imap_valid to fit the new world order, and clean up xfs_iomap_valid to convert the passed in offset to blocks instead of the imap values to bytes. Use the simpler inode->i_blkbits instead of the XFS macros for this. Signed-off-by: NChristoph Hellwig <hch@lst.de> Signed-off-by: NAlex Elder <aelder@sgi.com>
-
由 Christoph Hellwig 提交于
The IOMAP_ flags are now only used inside xfs_aops.c for extent probing and I/O completion tracking, so more them here, and rename them to IO_* as there's no mapping involved at all. Signed-off-by: NChristoph Hellwig <hch@lst.de> Signed-off-by: NAlex Elder <aelder@sgi.com>
-
由 Christoph Hellwig 提交于
Now that struct xfs_iomap contains exactly the same units as struct xfs_bmbt_irec we can just use the latter directly in the aops code. Replace the missing IOMAP_NEW flag with a new boolean output parameter to xfs_iomap. Signed-off-by: NChristoph Hellwig <hch@lst.de> Signed-off-by: NAlex Elder <aelder@sgi.com>
-
由 Christoph Hellwig 提交于
Report the iomap_bn field of struct xfs_iomap in terms of filesystem blocks instead of in terms of bytes. Shift the byte conversions into the caller, and replace the IOMAP_DELAY and IOMAP_HOLE flag checks with checks for HOLESTARTBLOCK and DELAYSTARTBLOCK. Signed-off-by: NChristoph Hellwig <hch@lst.de> Signed-off-by: NAlex Elder <aelder@sgi.com>
-
由 Christoph Hellwig 提交于
Report the iomap_offset and iomap_bsize fields of struct xfs_iomap in terms of fsblocks instead of in terms of disk blocks. Shift the byte conversions into the callers temporarily, but they will disappear or get cleaned up later. Signed-off-by: NChristoph Hellwig <hch@lst.de> Signed-off-by: NAlex Elder <aelder@sgi.com>
-