10 Jan, 2009
1 commit
-
Currently, ext3 in mainline Linux doesn't have the freeze feature which
suspends write requests. So, we cannot take a backup which keeps the
filesystem's consistency with the storage device's features (snapshot and
replication) while it is mounted.In many case, a commercial filesystem (e.g. VxFS) has the freeze feature
and it would be used to get the consistent backup.If Linux's standard filesystem ext3 has the freeze feature, we can do it
without a commercial filesystem.So I have implemented the ioctls of the freeze feature.
I think we can take the consistent backup with the following steps.
1. Freeze the filesystem with the freeze ioctl.
2. Separate the replication volume or create the snapshot
with the storage device's feature.
3. Unfreeze the filesystem with the unfreeze ioctl.
4. Take the backup from the separated replication volume
or the snapshot.This patch:
VFS:
Changed the type of write_super_lockfs and unlockfs from "void"
to "int" so that they can return an error.
Rename write_super_lockfs and unlockfs of the super block operation
freeze_fs and unfreeze_fs to avoid a confusion.ext3, ext4, xfs, gfs2, jfs:
Changed the type of write_super_lockfs and unlockfs from "void"
to "int" so that write_super_lockfs returns an error if needed,
and unlockfs always returns 0.reiserfs:
Changed the type of write_super_lockfs and unlockfs from "void"
to "int" so that they always return 0 (success) to keep a current behavior.Signed-off-by: Takashi Sato
Signed-off-by: Masayuki Hamaguchi
Cc:
Cc:
Cc: Christoph Hellwig
Cc: Dave Kleikamp
Cc: Dave Chinner
Cc: Alasdair G Kergon
Cc: Al Viro
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
06 Jan, 2009
1 commit
-
We used to put them on a single list, without any locking. Racy.
Signed-off-by: Al Viro
01 Jan, 2009
1 commit
-
jfs version of Al Viro's nfsd race patches
Signed-off-by: Dave Kleikamp
Signed-off-by: Al Viro
31 Dec, 2008
1 commit
-
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/shaggy/jfs-2.6:
jfs: ensure symlinks are NUL-terminated
17 Dec, 2008
1 commit
-
This is an alternate fix for a bug reported and fixed by Duane Griffin.
Signed-off-by: Dave Kleikamp
Reported-by: Duane Griffin
14 Nov, 2008
1 commit
-
Wrap access to task credentials so that they can be separated more easily from
the task_struct during the introduction of COW creds.Change most current->(|e|s|fs)[ug]id to current_(|e|s|fs)[ug]id().
Change some task->e?[ug]id to task_e?[ug]id(). In some places it makes more
sense to use RCU directly rather than a convenient wrapper; these will be
addressed by later patches.Signed-off-by: David Howells
Reviewed-by: James Morris
Acked-by: Serge Hallyn
Acked-by: Dave Kleikamp
Cc: jfs-discussion@lists.sourceforge.net
Signed-off-by: James Morris
24 Oct, 2008
1 commit
-
* git://git.kernel.org/pub/scm/linux/kernel/git/viro/bdev: (66 commits)
[PATCH] kill the rest of struct file propagation in block ioctls
[PATCH] get rid of struct file use in blkdev_ioctl() BLKBSZSET
[PATCH] get rid of blkdev_locked_ioctl()
[PATCH] get rid of blkdev_driver_ioctl()
[PATCH] sanitize blkdev_get() and friends
[PATCH] remember mode of reiserfs journal
[PATCH] propagate mode through swsusp_close()
[PATCH] propagate mode through open_bdev_excl/close_bdev_excl
[PATCH] pass fmode_t to blkdev_put()
[PATCH] kill the unused bsize on the send side of /dev/loop
[PATCH] trim file propagation in block/compat_ioctl.c
[PATCH] end of methods switch: remove the old ones
[PATCH] switch sr
[PATCH] switch sd
[PATCH] switch ide-scsi
[PATCH] switch tape_block
[PATCH] switch dcssblk
[PATCH] switch dasd
[PATCH] switch mtd_blkdevs
[PATCH] switch mmc
...
23 Oct, 2008
2 commits
-
With this patch all directory fops instances that have a readdir
that doesn't take the BKL are switched to generic_file_llseek.Signed-off-by: Christoph Hellwig
-
Switch all users of d_alloc_anon to d_obtain_alias.
Signed-off-by: Christoph Hellwig
Signed-off-by: Al Viro
21 Oct, 2008
1 commit
-
Signed-off-by: Al Viro
14 Oct, 2008
1 commit
-
This is a much better version of a previous patch to make the parser
tables constant. Rather than changing the typedef, we put the "const" in
all the various places where its required, allowing the __initconst
exception for nfsroot which was the cause of the previous trouble.This was posted for review some time ago and I believe its been in -mm
since then.Signed-off-by: Steven Whitehouse
Cc: Alexander Viro
Signed-off-by: Linus Torvalds
27 Jul, 2008
2 commits
-
* kill nameidata * argument; map the 3 bits in ->flags anybody cares
about to new MAY_... ones and pass with the mask.
* kill redundant gfs2_iop_permission()
* sanitize ecryptfs_permission()
* fix remaining places where ->permission() instances might barf on new
MAY_... found in mask.The obvious next target in that direction is permission(9)
folded fix for nfs_permission() breakage from Miklos Szeredi
Signed-off-by: Al Viro
-
Kmem cache passed to constructor is only needed for constructors that are
themselves multiplexeres. Nobody uses this "feature", nor does anybody uses
passed kmem cache in non-trivial way, so pass only pointer to object.Non-trivial places are:
arch/powerpc/mm/init_64.c
arch/powerpc/mm/hugetlbpage.cThis is flag day, yes.
Signed-off-by: Alexey Dobriyan
Acked-by: Pekka Enberg
Acked-by: Christoph Lameter
Cc: Jon Tollefson
Cc: Nick Piggin
Cc: Matt Mackall
[akpm@linux-foundation.org: fix arch/powerpc/mm/hugetlbpage.c]
[akpm@linux-foundation.org: fix mm/slab.c]
[akpm@linux-foundation.org: fix ubifs]
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
26 Jul, 2008
1 commit
-
Move declarations of some macros, which should be in fact functions to
quotaops.h. This way they can be later converted to inline functions
because we can now use declarations from quota.h. Also add necessary
includes of quotaops.h to a few files.[akpm@linux-foundation.org: fix JFS build]
[akpm@linux-foundation.org: fix UFS build]
[vegard.nossum@gmail.com: fix QUOTA=n build]
Signed-off-by: Jan Kara
Cc: Vegard Nossum
Cc: Arjen Pool
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
11 Jun, 2008
1 commit
-
After fat gets fixed the unused DIRENTSIZ macro was the last user of
struct dirent we should get rid of since the kernel and userspace
versions differed.Signed-off-by: Adrian Bunk
Signed-off-by: Dave Kleikamp
28 May, 2008
1 commit
-
The comment above the function says one of its return value is -EIO,
and also the caller of diAlloc() checks for -EIO:struct inode *ialloc(struct inode *parent, umode_t mode)
{
...
rc = diAlloc(parent, S_ISDIR(mode), inode);
if (rc) {
jfs_warn("ialloc: diAlloc returned %d!", rc);
if (rc == -EIO)
make_bad_inode(inode);
...Signed-off-by: Li Zefan
Signed-off-by: Dave Kleikamp
21 May, 2008
1 commit
-
If jfs_iget() fails, we can't call iput() on the returned error.
Thanks to Eric Sesterhenn's fuzzer testing for reporting the problem.Signed-off-by: Dave Kleikamp
13 May, 2008
2 commits
-
Signed-off-by: Alexey Dobriyan
Signed-off-by: Dave Kleikamp -
Signed-off-by: Marcin Slusarz
Signed-off-by: Dave Kleikamp
Cc: jfs-discussion@lists.sourceforge.net
Cc: Alexander Viro
29 Apr, 2008
1 commit
-
Use creation by full path instead: "fs/foo".
Signed-off-by: Alexey Dobriyan
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
19 Apr, 2008
1 commit
-
Some ioctl()s can cause writes to the filesystem. Take these, and make them
use mnt_want/drop_write() instead.[AV: updated]
Acked-by: Al Viro
Signed-off-by: Christoph Hellwig
Signed-off-by: Dave Hansen
Signed-off-by: Andrew Morton
Signed-off-by: Al Viro
06 Mar, 2008
1 commit
-
Signed-off-by: Harvey Harrison
Signed-off-by: Dave Kleikamp
14 Feb, 2008
1 commit
-
replace all:
little_endian_variable = cpu_to_leX(leX_to_cpu(little_endian_variable) +
expression_in_cpu_byteorder);
with:
leX_add_cpu(&little_endian_variable, expression_in_cpu_byteorder);
generated with semantic patchSigned-off-by: Marcin Slusarz
Signed-off-by: Dave Kleikamp
Cc: jfs-discussion@lists.sourceforge.net
08 Feb, 2008
3 commits
-
The ioctls were already compatible except for the actual values so this
was fairly easy to do.Signed-off-by: Andi Kleen
Signed-off-by: Dave Kleikamp -
Convert jfs_ioctl over to not use the BKL. The only potential race
I could see was with two ioctls in parallel changing the flags
and losing the updates. Use the i_mutex to protect against this.Signed-off-by: Andi Kleen
Signed-off-by: Dave Kleikamp -
Stop the JFS filesystem from using iget() and read_inode(). Replace
jfs_read_inode() with jfs_iget(), and call that instead of iget(). jfs_iget()
then uses iget_locked() directly and returns a proper error code instead of an
inode in the event of an error.jfs_fill_super() returns any error incurred when getting the root inode
instead of EINVAL.Signed-off-by: David Howells
Acked-by: Dave Kleikamp
Acked-by: Christoph Hellwig
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
03 Feb, 2008
1 commit
-
Signed-off-by: Paulius Zaleckas
Signed-off-by: Adrian Bunk
25 Jan, 2008
1 commit
-
Add iocharset= and errors= options to /proc/mounts for jfs
filesystems.Signed-off-by: Miklos Szeredi
Signed-off-by: Dave Kleikamp
11 Jan, 2008
1 commit
-
jfs_metapage.c was using uints and unsigned ints inconsistently when
regular ints suffice.Signed-off-by: Dave Kleikamp
04 Jan, 2008
7 commits
-
Signed-off-by: Dave Kleikamp
-
Remove sparse warning: Using plain integer as NULL pointer
Signed-off-by: Joe Perches
Signed-off-by: Dave Kleikamp -
This replaces some macros and code, which do the same thing as DIV_ROUND_UP
defined in kernel.h, to use the DIV_ROUND_UP macro.Signed-off-by: Shaun Zinck
Signed-off-by: Dave Kleikamp -
Signed-off-by: Jack Stone
Signed-off-by: Dave Kleikamp -
JFS is missing a memory barrier needed to close the critical section before
clearing the lock bit. Use lock bitops for this.unlock_page() has a second barrier after clearing the lock, which is
required because it checks whether the waitqueue is active without locks.
Such a barrier is not required here because the waitqueue spinlock is
always taken (something to think about if performance is an issue).Signed-off-by: Nick Piggin
Signed-off-by: Dave Kleikamp -
This patch makes sure that data that we tried to flush before the journal
was completely written actually gets pushed to disk.To avoid duplicating code, moved common code to write_special_inodes().
Signed-off-by: Dave Kleikamp
-
When JFS decides to drop a dirty metapage, it simply clears the META_dirty
bit and leave alone the PG_dirty and PAGECACHE_TAG_DIRTY bits.When such no-write page goes to metapage_writepage(), the `relic'
PAGECACHE_TAG_DIRTY tag should be cleared, to prevent pdflush from
repeatedly trying to sync them. This is done through
set_page_writeback(), so call it should be called in all cases. If
no I/O is initiated, end_page_writeback() should be called immediately.This is how __block_write_full_page() does things.
Signed-off-by: Dave Kleikamp
CC: Fengguang Wu
15 Nov, 2007
1 commit
-
Forbid user from changing file flags on quota files. User has no bussiness
in playing with these flags when quota is on. Furthermore there is a
remote possibility of deadlock due to a lock inversion between quota file's
i_mutex and transaction's start (i_mutex for quota file is locked only when
trasaction is started in quota operations) in ext3 and ext4.Signed-off-by: Jan Kara
Cc: LIOU Payphone
Cc:
Acked-by: Dave Kleikamp
Cc:
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
22 Oct, 2007
2 commits
-
Now that nfsd has stopped writing to the find_exported_dentry member we an
mark the export_operations constSigned-off-by: Christoph Hellwig
Cc: Neil Brown
Cc: "J. Bruce Fields"
Cc:
Cc: Dave Kleikamp
Cc: Anton Altaparmakov
Cc: David Chinner
Cc: Timothy Shimmin
Cc: OGAWA Hirofumi
Cc: Hugh Dickins
Cc: Chris Mason
Cc: Jeff Mahoney
Cc: "Vladimir V. Saveliev"
Cc: Steven Whitehouse
Cc: Mark Fasheh
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Trivial switch over to the new generic helpers.
Signed-off-by: Christoph Hellwig
Cc: Neil Brown
Cc: "J. Bruce Fields"
Cc: Dave Kleikamp
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
20 Oct, 2007
1 commit
-
Fix the various misspellings of "system", controller", "interrupt" and
"[un]necessary".Signed-off-by: Robert P. J. Day
Signed-off-by: Adrian Bunk