| Age | Commit message (Collapse) | Author |
|
This doesn't make much sense, and it exposes a bug in the kernel where
attempts to create a new file in an append-only directory using
O_CREAT will fail (but still leave a zero-length file). This was
discovered when xfstests #79 was generalized so it could run on all
file systems.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Cc:stable@kernel.org
|
|
AC_CHECK_HEADERS([linux/ext2_fs.h])
fails with
configure:34666: checking linux/ext2_fs.h usability
configure:34666: gcc -std=gnu99 -c -ggdb3 -O0 -Wunreachable-code conftest.c >&5
In file included from conftest.c:406:0:
/usr/include/linux/ext2_fs.h: In function 'ext2_mask_flags':
/usr/include/linux/ext2_fs.h:182:21: error: 'FS_DIRSYNC_FL' undeclared (first use in this function)
/usr/include/linux/ext2_fs.h:182:21: note: each undeclared identifier is reported only once for each function it appears in
/usr/include/linux/ext2_fs.h:182:37: error: 'FS_TOPDIR_FL' undeclared (first use in this function)
/usr/include/linux/ext2_fs.h:184:19: error: 'FS_NODUMP_FL' undeclared (first use in this function)
/usr/include/linux/ext2_fs.h:184:34: error: 'FS_NOATIME_FL' undeclared (first use in this function)
It's reasonable to have headers that include all necessary definitions. So fix
this by including fs.h into ext2_fs.h.
Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
Signed-off-by: Jan Kara <jack@suse.cz>
|
|
It is somewhat dangerous to use a straight enum here, because this will
reassign values of later variables if one of the earlier ones is removed.
Signed-off-by: Jan Blunck <jblunck@suse.de>
Cc: Andreas Dilger <adilger@sun.com>
Signed-off-by: Jan Kara <jack@suse.cz>
|
|
At the moment there are few restrictions on which flags may be set on
which inodes. Specifically DIRSYNC may only be set on directories and
IMMUTABLE and APPEND may not be set on links. Tighten that to disallow
TOPDIR being set on non-directories and only NODUMP and NOATIME to be set
on non-regular file, non-directories.
Introduces a flags masking function which masks flags based on mode and
use it during inode creation and when flags are set via the ioctl to
facilitate future consistency.
Signed-off-by: Duane Griffin <duaneg@dghda.com>
Acked-by: Andreas Dilger <adilger@sun.com>
Cc: <linux-ext4@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
|
At present BTREE/INDEX is the only flag that new ext2 inodes do NOT
inherit from their parent. In addition prevent the flags DIRTY, ECOMPR,
INDEX, IMAGIC and TOPDIR from being inherited. List inheritable flags
explicitly to prevent future flags from accidentally being inherited.
This fixes the TOPDIR flag inheritance bug reported at
http://bugzilla.kernel.org/show_bug.cgi?id=9866.
Signed-off-by: Duane Griffin <duaneg@dghda.com>
Acked-by: Andreas Dilger <adilger@sun.com>
Cc: <linux-ext4@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
|
__FUNCTION__ is gcc-specific, use __func__
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
|
Fix typo in Hurd part of include/linux/ext2_fs.h
The ';' here is redundant or can even pose problem. This is actually not
used by the Linux kernel, but it is exposed in GNU/Hurd.
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
|
In commit a686cd898bd999fd026a51e90fb0a3410d258ddb:
"Val's cross-port of the ext3 reservations code into ext2."
include/linux/ext2_fs.h got a new function whose return value is only
defined if __KERNEL__ is defined. Putting #ifdef __KERNEL__ around the
function seems to help, patch below.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
|
With 64KB blocksize, a directory entry can have size 64KB which does not
fit into 16 bits we have for entry length. So we store 0xffff instead and
convert the value when read from / written to disk.
[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Jan Kara <jack@suse.cz>
Cc: <linux-ext4@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
|
Val's cross-port of the ext3 reservations code into ext2.
[mbligh@mbligh.org: Small type error for printk
[akpm@linux-foundation.org: fix types, sync with ext3]
[mbligh@mbligh.org: Bring ext2 reservations code in line with latest ext3]
[akpm@linux-foundation.org: kill noisy printk]
[akpm@linux-foundation.org: remember to dirty the gdp's block]
[akpm@linux-foundation.org: cross-port the missed 5dea5176e5c32ef9f0d1a41d28427b3bf6881b3a]
[akpm@linux-foundation.org: cross-port e6022603b9aa7d61d20b392e69edcdbbc1789969]
[akpm@linux-foundation.org: Port the omitted 08fb306fe63d98eb86e3b16f4cc21816fa47f18e]
[akpm@linux-foundation.org: Backport the missed 20acaa18d0c002fec180956f87adeb3f11f635a6]
[akpm@linux-foundation.org: fixes]
[cmm@us.ibm.com: fix reservation extension]
[bunk@stusta.de: make ext2_get_blocks() static]
[hugh@veritas.com: fix hang]
[hugh@veritas.com: ext2_new_blocks should reset the reservation window size]
[hugh@veritas.com: ext2 balloc: fix off-by-one against rsv_end]
[hugh@veritas.com: grp_goal 0 is a genuine goal (unlike -1), so ext2_try_to_allocate_with_rsv should treat it as such]
[hugh@veritas.com: rbtree usage cleanup]
[pbadari@us.ibm.com: Fix for ext2 reservation]
[bunk@kernel.org: remove fs/ext2/balloc.c:reserve_blocks()]
[hugh@veritas.com: ext2 balloc: use io_error label]
Cc: "Martin J. Bligh" <mbligh@mbligh.org>
Cc: Valerie Henson <val_henson@linux.intel.com>
Cc: Mingming Cao <cmm@us.ibm.com>
Cc: Mel Gorman <mel@csn.ul.ie>
Cc: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Badari Pulavarty <pbadari@us.ibm.com>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
|
Move common FS-specific ioctls from linux/ext2_fs.h to linux/fs.h as FS_IOC_*
and FS_IOC32_* and have the users of them use those as a base.
Also move the GETFLAGS/SETFLAGS flags to linux/fs.h as FS_*_FL macros, and then
have the other users use them as a base.
Signed-Off-By: David Howells <dhowells@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
|
Signed-off-by: Jeff Garzik <jeff@garzik.org>
|
|
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
|
|
If /etc/mtab is a regular file all of the mount options (of a file system)
are written to /etc/mtab by the mount command. The quota tools look there
for the quota strings for their operation. If, however, /etc/mtab is a
symlink to /proc/mounts (a "good thing" in some environments) the tools
don't write anything - they assume the kernel will take care of things.
While the quota options are sent down to the kernel via the mount system
call and the file system codes handle them properly unfortunately there is
no code to echo the quota strings into /proc/mounts and the quota tools
fail in the symlink case.
The attached patchs modify the EXT[2|3] and JFS codes to add the necessary
hooks. The show_options function of each file system in these patches
currently deal with only those things that seemed related to quotas;
especially in the EXT3 case more can be done (later?).
Jan Kara also noted the difficulty in moving these changes above the FS
codes responding similarly to myself to Andrew's comment about possible
VFS migration. Issue summary:
- FS codes have to process the entire string of options anyway.
- Only FS codes that use quotas must have a show_options function (for
quotas to work properly) however quotas are only used in a small number
of FS.
- Since most of the quota using FS support other options these FS codes
should have the a show_options function to show those options - and the
quota echoing becomes virtually negligible.
Based on feedback I have modified my patches from the original:
JFS a missing patch has been restored to the posting
EXT[2|3] and JFS always use the show_options function
- Each FS has at least one FS specific option displayed
- QUOTA output is under a CONFIG_QUOTA ifdef
- a follow-on patch will add a multitude of options for each FS
EXT[2|3] and JFS "quota" is treated as "usrquota"
EXT3 journalled data check for journalled quota removed
EXT[2|3] mount when quota specified but not compiled in
- no changes from my original patch. I tested the patch and the codes
warn but
- still mount. With all due respection I believe the comments
otherwise were a
- misread of the patch. Please reread/test and comment. XFS patch
removed - the XFS team already made the necessary changes EXT3 mixing
old and new quotas are handled differently (not purely exclusive)
- if old and new quotas for the same type are used together the old
type is silently depricated for compatability (e.g. usrquota and
usrjquota)
- mixing of old and new quotas is an error (e.g. usrjquota and
grpquota)
Signed-off-by: Mark Bellon <mbellon@mvista.com>
Acked-by: Dave Kleikamp <shaggy@austin.ibm.com>
Cc: Jan Kara <jack@ucw.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
These are the ext2 related parts. Ext2 now uses the xip_* file operations
along with the get_xip_page aop when mounted with -o xip.
Signed-off-by: Carsten Otte <cotte@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
Signed-off-by: Al Viro <viro@parcelfarce.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
Implements a new set of block address_space_operations which will never
attach buffer_heads to file pagecache. These can be turned on for ext2
with the `nobh' mount option.
During write-intensive testing on a 7G machine, total buffer_head
storage remained below 0.3 megabytes. And those buffer_heads are
against ZONE_NORMAL pagecache and will be reclaimed by ZONE_NORMAL
memory pressure.
This work is, of course, a special for the huge highmem machines.
Possibly it obsoletes the buffer_heads_over_limit stuff (which doesn't
work terribly well), but that code is simple, and will provide relief
for other filesystems.
It should be noted that the nobh_prepare_write() function and the
PageMappedToDisk() infrastructure is what is needed to solve the
problem of user data corruption when the filesystem which backs a
sparse MAP_SHARED mapping runs out of space. We can use this code in
filemap_nopage() to ensure that all mapped pages have space allocated
on-disk. Deliver SIGBUS on ENOSPC.
This will require a new address_space op, I expect.
|
|
I finally had time to look at the Orlov patches, and found a memory
leak; sbi->s_debts wasn't getting freed when the filesystem was
getting unmounted, or in the error path.
This patch also makes the following cleanups/changes:
1) Use sbi->s_debts instead of sbi->debts --- all other fields in
struct ext2_sb_info are prefixed by "s_", so this makes things
consistent.
2) Add support for a new inode flag, EXT2_TOPDIR_FL, which tells tells
the Orlov allocator to treat that directory as the top of
directory hierarchies, so that new subdirectories created in
that directory should be spread apart. System administrators
should set this flag on directories like /usr/src, /usr/home, etc.
3) Add a mount-time flag, -o oldalloc, which forces the use of the old
inode (pre-Orlov) allocator. This makes it easier to do
comparison benchmarks, and in case people want to use the old
algorithm.
|
|
This patch adds ACL support to the ext2 filesystem.
|
|
This patch adds extended attribute support to the ext2 filesystem. This
uses the generic extended attribute patch which was developed by Andreas
Gruenbacher and the XFS team. As a result, the user space utilities
which work for XFS will also work with these patches.
|
|
This patch allows forward compatibility with future filesystems which
are dynamically grown by using an alternate algorithm for storing the
block group descriptors. It's also a bit more efficient, in that it
uses just a little bit less disk space. Currently, the ext2 filesystem
format requires either relocating the inode table, or reserving space in
before doing the on-line resize. The new scheme, which is documented in
"Planned Extensions to the Ext2/3 Filesystem", by Stephen Tweedie and I
(see: http://e2fsprogs.sourceforge.net/extensions-ext23)
|
|
This patch adds support for default mount options to be stored in the
superblock, so they don't have to be specified on the mount command line
(or in /etc/fstab). While I was in the code, I also cleaned up the
handling of how mount options are processed in the ext2 and ext3
filesystems.
Most mount options are now processed *after* the superblock has been
read in. This allows for a much cleaner handling of those default mount
option parameters that were already stored in the superblock: the
resuid, resgid, and s_errors fields were handled using some fairly gross
special cases. Now the only mount option which is processed first is
the sb option, which specifies the location of the superblock. This
allows the handling of all of the default mount parameters to be much
more cleanly and more generally handled.
This does change the behaviour from earlier kernels, in that if the sb
mount option is specified, it must be specified *first*. However, this
option is rarely used, and if it is, it generally is specified first, so
this seems to be a reasonable restriction.
|
|
This last patch removes the union, replacing it with s_fs_info.
|
|
An implementation of directory-synchronous mounts.
I sent this out some months ago and it didn't generate a lot of
interest. Later we had one of the usual cheery exchanges with Wietse
Venema (postfix development) and he agreed that directory synchronous
mounts were something that he could use, and that there was benefit in
implementing them in Linux. If you choose to apply this I'll push the
2.4 patch.
Patch against e2fsprogs-1.26:
http://www.zip.com.au/~akpm/linux/dirsync/e2fsprogs-1.26.patch
Patch against util-linux-2.11n:
http://www.zip.com.au/~akpm/linux/dirsync/util-linux-2.11n.patch
The kernel patch includes implementations for ext2 and ext3. It's
pretty simple.
- When dirsync is in operation against a directory, the following operations
are synchronous within that directory: create, link, unlink, symlink,
mkdir, rmdir, mknod, rename (synchronous if either the source or dest
directory is dirsync).
- dirsync is a subset of sync. So `mount -o sync' or `chattr +S'
give you everything which `mount -o dirsync' or `chattr +D' gives,
plus synchronous file writes.
- ext2's inode.i_attr_flags is unused, and is removed.
- mount /dev/foo /mnt/bar -o dirsync works as expected.
- An ext2 or ext3 directory tree can be set dirsync with `chattr +D -R'.
- dirsync is maintained as new directories are created under
a `chattr +D' directory. Like `chattr +S'.
- Other filesystems can trivially be taught about dirsync. It's just
a matter of replacing `IS_SYNC(inode)' with `IS_DIRSYNC(inode)' in
the directory update functions. IS_SYNC will still be honoured when
IS_DIRSYNC is used.
- Non-directory files do not have their dirsync flag propagated. So
an S_ISREG file which is created inside a dirsync directory will not
have its dirsync bit set. chattr needs to do this as well.
- There was a bit of version skew between e2fsprogs' idea of the
inode flags and the kernel's. That is sorted out here.
- `lsattr' shows the dirsync flag as "D". The letter "D" was
previously being used for Compressed_Dirty_File. I changed
Compressed_Dirty_File to use "Z". Is that OK?
The mount(2) manpage needs to be taught about MS_DIRSYNC.
|
|
Complete the ext2 superblock seperation.
|
|
Abstract access to ext2_sb_info.
|
|
- Al Viro: VFS inode allocation moved down to filesystem, trim inodes
- Greg KH: USB update, hotplug documentation
- Kai Germaschewski: ISDN update
- Ingo Molnar: scheduler tweaking ("J2")
- Arnaldo: emu10k kdev_t updates
- Ben Collins: firewire updates
- Björn Wesen: cris arch update
- Hal Duston: ps2esdi driver bio/kdev_t fixes
- Jean Tourrilhes: move wireless drivers into drivers/net/wireless,
update wireless API #1
- Richard Gooch: devfs race fix
- OGAWA Hirofumi: FATFS update
|
|
- Trond Myklebust: deadlock checking in lockd server
- Tim Waugh: fix up parport wrong #define
- Christoph Hellwig: i2c update, ext2 cleanup
- Al Viro: fix partition handling sanity check.
- Trond Myklebust: make NFS use SLAB_NOFS, and not play games with PF_MEMALLOC
- Ben Fennema: UDF update
- Alan Cox: continued merging
- Chris Mason: get /proc buffer memory sizes right after buf-in-page-cache
|
|
- Greg KH: USB update (fix UHCI timeouts, serial unplug)
- Christoph Rohland: shmem locking fixes
- Al Viro: more mount cleanup
- me: fix bad interaction with link_count handling
- David Miller: Sparc updates, net cleanup
- Tim Waugh: parport update
- Jeff Garzik: net driver updates
|
|
- Keith Owens: module exporting error checking
- Greg KH: USB update
- Paul Mackerras: clean up wait_init_idle(), ppc prefetch macros
- Jan Kara: quota fixes
- Abraham vd Merwe: agpgart support for Intel 830M
- Jakub Jelinek: ELF loader cleanups
- Al Viro: more cleanups
- David Miller: sparc64 fix, netfilter fixes
- me: tweak resurrected oom handling
|
|
- Andreas Dilger: various ext2 cleanups
- Richard Gooch: devfs update
- Johannes Erdfelt: USB updates
- Alan Cox: merges
- David Miller: fix SMP pktsched bootup deadlock (CONFIG_NET_SCHED)
- Roman Zippel: AFFS update
- Anton Altaparmakov: NTFS update
- me: fix races in vfork() (semaphores are not good completion handlers)
- Jeff Garzik: net driver updates, sysvfs update
|
|
- Andreas Dilger: make ext2fs react more gracefully to inode disk
errors
- Andrea Arkangeli: fix up alpha compile issues
- Ingo Molnar: io-apic MP table parsing update and softirq latency
update
- Johannes Erdfelt: USB updates
- Richard Henderson: alpha rawhide irq handling fixes
- Marcelo, Andrea, Rik: more VM issues
- Al Viro: fix various ext2 directory handling checks by biting the
bullet and using the page cache.
|
|
|