aboutsummaryrefslogtreecommitdiffstats
path: root/fs
Commit message (Collapse)AuthorAgeFilesLines
* quota: Refactor dquot_transfer code so that OCFS2 can pass in its referencesJan Kara2010-05-211-35/+26
| | | | | | | | | | | | | | | 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: Jan Kara <jack@suse.cz>
* quota: unify quota init condition in setattrDmitry Monakhov2010-05-219-15/+15
| | | | | | | | | | | | | 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: Dmitry Monakhov <dmonakhov@openvz.org> Signed-off-by: Jan Kara <jack@suse.cz>
* quota: remove sb_has_quota_active in get/set_infoChristoph Hellwig2010-05-211-4/+0
| | | | | | | | | 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: Christoph Hellwig <hch@lst.de> Signed-off-by: Jan Kara <jack@suse.cz>
* quota: unify ->set_dqblkChristoph Hellwig2010-05-215-37/+86
| | | | | | | | | | | | | | 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: Christoph Hellwig <hch@lst.de> Signed-off-by: Jan Kara <jack@suse.cz>
* quota: unify ->get_dqblkChristoph Hellwig2010-05-214-21/+39
| | | | | | | | | | | 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: Christoph Hellwig <hch@lst.de> Signed-off-by: Jan Kara <jack@suse.cz>
* ext3: make barrier options consistent with ext4Eric Sandeen2010-05-211-7/+26
| | | | | | | | | | | | | | | | | 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: Eric Sandeen <sandeen@redhat.com> Signed-off-by: Jan Kara <jack@suse.cz>
* quota: Make quota stat accounting lockless.Dmitry Monakhov2010-05-213-38/+72
| | | | | | | | | | | | 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: Dmitry Monakhov <dmonakhov@openvz.org> Signed-off-by: Jan Kara <jack@suse.cz>
* suppress warning: "quotatypes" defined but not usedSergey Senozhatsky2010-05-211-0/+2
| | | | | | | | | 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: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> Signed-off-by: Jan Kara <jack@suse.cz>
* ext3: Fix waiting on transaction during fsyncJan Kara2010-05-212-12/+10
| | | | | | | | | | 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: Jan Kara <jack@suse.cz>
* jbd: Provide function to check whether transaction will issue data barrierJan Kara2010-05-212-1/+40
| | | | | | | | 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: Jan Kara <jack@suse.cz>
* ufs: add ufs speciffic ->setattr callDmitry Monakhov2010-05-215-3/+13
| | | | | | | | generic setattr not longer responsible for quota transfer. use ufs_setattr for all ufs's inodes. Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org> Signed-off-by: Jan Kara <jack@suse.cz>
* BKL: Remove BKL from ext2 filesystemJan Blunck2010-05-212-16/+0
| | | | | | | | | | | | | | | | | | | 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: Jan Blunck <jblunck@suse.de> Cc: Jan Kara <jack@suse.cz> Signed-off-by: Jan Kara <jack@suse.cz>
* ext2: Add ext2_sb_info s_lock spinlockJan Blunck2010-05-213-1/+30
| | | | | | | | | | | | | | | | | | | 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: Jan 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: Jan Kara <jack@suse.cz>
* ext2: Move ext2_write_super() out of ext2_setup_super()Jan Blunck2010-05-211-3/+5
| | | | | | | | 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: Jan Blunck <jblunck@suse.de> Signed-off-by: Jan Kara <jack@suse.cz>
* ext2: Fold ext2_commit_super() into ext2_sync_super()Jan Blunck2010-05-211-19/+9
| | | | | | | | | | 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: Jan Blunck <jblunck@suse.de> Signed-off-by: Jan Kara <jack@suse.cz>
* ext2: Remove duplicate code from ext2_sync_fs()Jan Blunck2010-05-211-7/+0
| | | | | | | | | | | | 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: Jan Blunck <jblunck@suse.de> Signed-off-by: Jan Kara <jack@suse.cz>
* ext2: Set the write time in ext2_sync_fs()Jan Blunck2010-05-211-1/+1
| | | | | | | | 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: Jan Blunck <jblunck@suse.de> Signed-off-by: Jan Kara <jack@suse.cz>
* ext2: Use ext2_clear_super_error() in ext2_sync_fs()Jan Blunck2010-05-211-17/+3
| | | | | | | ext2_sync_fs() used to duplicate the code from ext2_clear_super_error(). Signed-off-by: Jan Blunck <jblunck@suse.de> Signed-off-by: Jan Kara <jack@suse.cz>
* ext3: init statistics after journal recovery v2Dmitry Monakhov2010-05-211-23/+21
| | | | | | | | | | 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: Dmitry Monakhov <dmonakhov@openvz.org> Signed-off-by: Jan Kara <jack@suse.cz>
* ext2: remove useless call to brelse() in ext2_free_inode()Francis Moreau2010-05-211-5/+4
| | | | | | | | 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: Francis Moreau <francis.moro@gmail.com> Signed-off-by: Jan Kara <jack@suse.cz>
* quota: optimize mark_dirty logicDmitry Monakhov2010-05-211-2/+11
| | | | | | | | | - 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: Dmitry Monakhov <dmonakhov@openvz.org> Signed-off-by: Jan Kara <jack@suse.cz>
* ext2: Avoid loading bitmaps for full groups during block allocationJan Kara2010-05-211-0/+6
| | | | | | | | | | | 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: Jan Kara <jack@suse.cz>
* ext3: Avoid loading bitmaps for full groups during block allocationFrans van de Wiel2010-05-211-0/+6
| | | | | | | | | | | | 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: "Frans van de Wiel" <fvdw@fvdw.eu> Signed-off-by: Jan Kara <jack@suse.cz>
* Merge branch 'for-linus' of ↵Linus Torvalds2010-05-2112-340/+412
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/ryusuke/nilfs2 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ryusuke/nilfs2: (23 commits) nilfs2: disallow remount of snapshot from/to a regular mount nilfs2: use huge_encode_dev/huge_decode_dev nilfs2: update comment on deactivate_super at nilfs_get_sb nilfs2: replace MS_VERBOSE with MS_SILENT nilfs2: add missing initialization of s_mode nilfs2: fix misuse of open_bdev_exclusive/close_bdev_exclusive nilfs2: enlarge s_volume_name member in nilfs_super_block nilfs2: use checkpoint number instead of timestamp to select super block nilfs2: add missing endian conversion on super block magic number nilfs2: make nilfs_sc_*_ops static nilfs2: add kernel doc comments to persistent object allocator functions nilfs2: change sc_timer from a pointer to an embedded one in struct nilfs_sc_info nilfs2: remove nilfs_segctor_init() in segment.c nilfs2: insert checkpoint number in segment summary header nilfs2: add a print message after loading nilfs2 nilfs2: cleanup multi kmem_cache_{create,destroy} code nilfs2: move out checksum routines to segment buffer code nilfs2: move pointer to super root block into logs nilfs2: change default of 'errors' mount option to 'remount-ro' mode nilfs2: Combine nilfs_btree_release_path() and nilfs_btree_free_path() ...
| * nilfs2: disallow remount of snapshot from/to a regular mountRyusuke Konishi2010-05-101-34/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Snapshots and regular ro/rw mounts are essentially-different within the meaning whether the checkpoint is static or not and is marked with a snapshot flag or not. The current implemenation, however, allows to remount a snapshot to a regular rw-mount if the checkpoint number equals the latest one. This transition is actually impossible since changing a checkpoint to a snapshot makes another checkpoint, thus the condition is never satisfied. This fixes the weird state of affairs, and specifically separates snapshots and regular rw/ro-mounts. Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
| * nilfs2: use huge_encode_dev/huge_decode_devRyusuke Konishi2010-05-101-2/+2
| | | | | | | | | | | | | | | | | | This replaces uses of new_encode_dev/new_decode_dev with their 64-bit counterparts, huge_encode_dev/huge_decode_dev respectively. This is just for clarification and has no impact on the disk format. Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
| * nilfs2: update comment on deactivate_super at nilfs_get_sbRyusuke Konishi2010-05-101-1/+1
| | | | | | | | | | | | | | deactivate_super was replaced with deactivate_locked_super, but the comment of nilfs_get_sb remain unchanged. This renews the comment. Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
| * nilfs2: replace MS_VERBOSE with MS_SILENTRyusuke Konishi2010-05-101-1/+2
| | | | | | | | | | | | | | MS_VERBOSE is deprecated. This replaces it with MS_SILENT in reference to get_sb_bdev function. Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
| * nilfs2: add missing initialization of s_modeRyusuke Konishi2010-05-101-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | An fmode_t argument is passed to kill_block_super() through s_mode member of the super_block structure. This is used to release the block device with the same mode, however, nilfs does not set s_mode anywhere. This modifies nilfs_get_sb function to properly initialize the s_mode member. Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
| * nilfs2: fix misuse of open_bdev_exclusive/close_bdev_exclusiveRyusuke Konishi2010-05-101-3/+7
| | | | | | | | | | | | | | The second argument of open_bdev_exclusive/close_bdev_exclusive takes fmode_t flags instead of mount flags. This fixes the misuse. Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
| * nilfs2: use checkpoint number instead of timestamp to select super blockRyusuke Konishi2010-05-101-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Nilfs maintains two super blocks, and selects the new one on mount time if they both have valid checksums and their timestamps differ. However, this has potential for mis-selection since the system clock may be rewinded and the resolution of the timestamps is not high. Usually this doesn't become an issue because both super blocks are updated at the same time when the file system is unmounted. Even if the file system wasn't unmounted cleanly, the roll-forward recovery will find the proper log which stores the latest super root. Thus, the issue can appear only if update of one super block fails and the clock happens to be rewinded. This fixes the issue by using checkpoint numbers instead of timestamps to pick the super block storing the location of the latest log. Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
| * nilfs2: add missing endian conversion on super block magic numberRyusuke Konishi2010-05-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | This adds missing endian conversions in comparision of the magic number of super blocks. It was coincidence that prior versions didn't incur problems; the upper byte of the magic number happened to be equal to the lower byte. But, semantically it's wrong to depend on this. This won't change anything else nor suffer any compatibility issues. Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
| * nilfs2: make nilfs_sc_*_ops staticRyusuke Konishi2010-05-101-3/+3
| | | | | | | | | | | | | | | | | | | | This kills the following sparse warnings: fs/nilfs2/segment.c:567:28: warning: symbol 'nilfs_sc_file_ops' was not declared. Should it be static? fs/nilfs2/segment.c:617:28: warning: symbol 'nilfs_sc_dat_ops' was not declared. Should it be static? fs/nilfs2/segment.c:625:28: warning: symbol 'nilfs_sc_dsync_ops' was not declared. Should it be static? Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
| * nilfs2: add kernel doc comments to persistent object allocator functionsRyusuke Konishi2010-05-102-1/+160
| | | | | | | | | | | | | | The implementation of persistent object allocator (alloc.c) is poorly documented. This adds kernel doc style comments on that functions. Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
| * nilfs2: change sc_timer from a pointer to an embedded one in struct ↵Li Hong2010-05-102-19/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | nilfs_sc_info In nilfs_segctor_thread(), timer is a local variable allocated on stack. Its address can't be set to sci->sc_timer and passed in several procedures. It works now by chance, just because other procedures are called by nilfs_segctor_thread() directly or indirectly and the stack hasn't been deallocated yet. Signed-off-by: Li Hong <lihong.hi@gmail.com> Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
| * nilfs2: remove nilfs_segctor_init() in segment.cLi Hong2010-05-101-8/+1
| | | | | | | | | | | | | | | | | | | | | | | | There are only two lines of code in nilfs_segctor_init(). From a logic design view, the first line 'sci->sc_seq_done = sci->sc_seq_request;' should be put in nilfs_segctor_new(). Even in nilfs_segctor_new(), this initialization is needless because sci is kzalloc-ed. So nilfs_segctor_init() is only a wrap call to nilfs_segctor_start_thread(). Signed-off-by: Li Hong <lihong.hi@gmail.com> Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
| * nilfs2: insert checkpoint number in segment summary headerRyusuke Konishi2010-05-104-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a field to record the latest checkpoint number in the nilfs_segment_summary structure. This will help to recover the latest checkpoint number from logs on disk. This field is intended for crucial cases in which super blocks have lost pointer to the latest log. Even though this will change the disk format, both backward and forward compatibility is preserved by a size field prepared in the segment summary header. Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
| * nilfs2: add a print message after loading nilfs2Li Hong2010-05-101-0/+1
| | | | | | | | | | | | | | | | Printing a message after loading a file system is a practice. Add this to provide a better user-friendly experience. Signed-off-by: Li Hong <lihong.hi@gmail.com> Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
| * nilfs2: cleanup multi kmem_cache_{create,destroy} codeLi Hong2010-05-107-164/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This cleanup patch gives several improvements: - Moving all kmem_cache_{create_destroy} calls into one place, which removes some small function calls, cleans up error check code and clarify the logic. - Mark all initial code in __init section. - Remove some very obvious comments. - Adjust some declarations. - Fix some space-tab issues. Signed-off-by: Li Hong <lihong.hi@gmail.com> Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
| * nilfs2: move out checksum routines to segment buffer codeRyusuke Konishi2010-05-103-36/+39
| | | | | | | | | | | | | | This moves out checksum routines in log writer to segbuf.c for cleanup. Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
| * nilfs2: move pointer to super root block into logsRyusuke Konishi2010-05-104-26/+25
| | | | | | | | | | | | | | This moves a pointer to buffer storing super root block to each log buffer from nilfs_sc_info struct for simplicity. Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
| * nilfs2: change default of 'errors' mount option to 'remount-ro' modeRyusuke Konishi2010-05-101-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | Like ext3, nilfs has 'errors' mount option to allow specifying desired behavior on severe errors. Currently, the default action is 'errors=continue' and has potential to advance filesystem corruption for severe errors. This will change the action to 'errors=remount-ro' to avoid the issue. Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
| * nilfs2: Combine nilfs_btree_release_path() and nilfs_btree_free_path()Li Hong2010-05-101-17/+5
| | | | | | | | | | | | | | | | | | nilfs_btree_release_path() and nilfs_btree_free_path() are bound into each other tightly. Make them into one procedure to clearify the logic and avoid some misusages. Signed-off-by: Li Hong <lihong.hi@gmail.com> Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
| * nilfs2: Combine nilfs_btree_alloc_path() and nilfs_btree_init_path()Li Hong2010-05-101-22/+17
| | | | | | | | | | | | | | | | | | nilfs_btree_alloc_path() and nilfs_btree_init_path() are bound into each other tightly. Make them into one procedure to clearify the logic and avoid some misusages. Signed-off-by: Li Hong <lihong.hi@gmail.com> Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
* | Merge git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-nmwLinus Torvalds2010-05-2119-179/+362
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-nmw: GFS2: Fix typo GFS2: stuck in inode wait, no glocks stuck GFS2: Eliminate useless err variable GFS2: Fix writing to non-page aligned gfs2_quota structures GFS2: Add some useful messages GFS2: fix quota state reporting GFS2: Various gfs2_logd improvements GFS2: glock livelock GFS2: Clean up stuffed file copying GFS2: docs update GFS2: Remove space from slab cache name
| * | GFS2: Fix typoSteven Whitehouse2010-05-141-1/+1
| | | | | | | | | | | | | | | | | | A missing ! in a test. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
| * | GFS2: stuck in inode wait, no glocks stuckBob Peterson2010-05-121-48/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch changes the lock ordering when gfs2 reclaims unlinked dinodes, thereby avoiding a livelock. Signed-off-by: Bob Peterson <rpeterso@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
| * | GFS2: Eliminate useless err variableBob Peterson2010-05-121-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | This patch removes an unneeded "err" variable that is always returned as zero. Signed-off-by: Bob Peterson <rpeterso@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
| * | GFS2: Fix writing to non-page aligned gfs2_quota structuresAbhijith Das2010-05-101-25/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the upstream fix for this bug. This patch differs from the RHEL5 fix (Red Hat bz #555754) which simply writes to the 8-byte value field of the quota. In upstream quota code, we're required to write the entire quota (88 bytes) which can be split across a page boundary. We check for such quotas, and read/write the two parts from/to the corresponding pages holding these parts. With this patch, I don't see the bug anymore using the reproducer in Red Hat bz 555754. I successfully ran a couple of simple tests/mounts/ umounts and it doesn't seem like this patch breaks anything else. Signed-off-by: Abhi Das <adas@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
| * | GFS2: Add some useful messagesSteven Whitehouse2010-05-064-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following patch adds a message to indicate when barriers have been disabled due to a block device which doesn't support them. You could already tell this via the mount options in /proc/mounts, but all the other filesystems also log a message at the same time. Also, the same mechanisms are used to indicate when the lock demote interface has been used (only ever used for debugging) which is a request from our support team. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>