Commit Graph

1216 Commits

Author SHA1 Message Date
Artem B. Bityutskiy d55849aa4d [JFFS2] Use memset(struct) instead of nulling struct members one by one
Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06 22:41:34 +01:00
Artem B. Bityutskiy 2f0077e018 [JFFS2] Remove stale comment
Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06 22:40:33 +01:00
Ferenc Havasi 2bc9764c48 [JFFS2] Rename jffs2_summary_node to jffs2_raw_summary
Signed-off-by: Ferenc Havasi <havasi@inf.u-szeged.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06 22:32:45 +01:00
Artem B. Bityutskiy 733802d974 [JFFS2] Debug code simplification, update TODO
Simplify the debugging code further.
Update the TODO list

Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06 22:20:33 +01:00
Ferenc Havasi 34c0e90671 [JFFS2] Account summary space in reserved_size.
Always keep valid data in reserved_size.

It did not cause problems, but the reservation code was unoptimal
when centralized summary was active or the size of the erase block
was very small.

Signed-off-by: Ferenc Havasi <havasi@inf.u-szeged.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06 21:47:18 +01:00
Artem B. Bityutskiy 81e39cf029 [JFFS2] Debug message format clean up
Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06 21:38:34 +01:00
Ferenc Havasi 8acff5e934 [JFFS2] Call summary collector for all mtd devices with writev support
Do the summary collection in the right place. If the device
was not writebuffered but had c->mtd->writev function
(e.g. blkmtd) the summary collector function was not called.

Signed-off-by: Ferenc Havasi <havasi@inf.u-szeged.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06 21:37:07 +01:00
Ferenc Havasi c617e84248 [JFFS2] Return real jffs2_sum_init() error code
Signed-off-by: Ferenc Havasi <havasi@inf.u-szeged.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06 21:31:05 +01:00
Ferenc Havasi e631ddba58 [JFFS2] Add erase block summary support (mount time improvement)
The goal of summary is to speed up the mount time. Erase block summary (EBS)
stores summary information at the end of every (closed) erase block. It is
no longer necessary to scan all nodes separetly (and read all pages of them)
just read this "small" summary, where every information is stored which is
needed at mount time.

This summary information is stored in a JFFS2_FEATURE_RWCOMPAT_DELETE. During
the mount process if there is no summary info the orignal scan process will
be executed. EBS works with NAND and NOR flashes, too.

There is a user space tool called sumtool to generate this summary
information for a JFFS2 image.

Signed-off-by: Ferenc Havasi <havasi@inf.u-szeged.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06 21:29:48 +01:00
Ferenc Havasi 4ce1f56218 [JFFS2] Remove support for virtual blocks
Remove support for virtual blocks, which are build by
concatenation of multiple physical erase blocks.

For more information please read the MTD mailing list thread
"[PATCH] remove support for virtual blocks"

Signed-off-by: Ferenc Havasi <havasi@inf.u-szeged.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06 21:08:27 +01:00
Artem B. Bityutskiy f0507530cb [JFFS2] Solve BUG caused by frag->node representing a hole in fragtree
Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06 20:32:36 +01:00
Artem B. Bityutskiy 280562b210 [JFFS2] Calculate CRC check starting point correctly
When data starts from the beginning of NAND page, 'len' must be zero, not
c->wbuf_page.

Thanks to Zoltan Sogor for reporting this problem.

Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06 20:29:56 +01:00
Artem B. Bityutskiy 8d5df40954 [JFFS2] More message formatting cleanups
Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06 20:27:14 +01:00
Artem B. Bityutskiy 3a69e0cd22 [JFFS2] Fix JFFS2 [mc]time handling
From: David Woodhouse <dwmw2@infradead.org>

Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06 20:25:59 +01:00
Artem B. Bityutskiy 01d445f89d [JFFS2] Make the JFFS2 messages a bit nicer
Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06 20:24:15 +01:00
Nicolas Pitre 59da721a22 [JFFS2] Teach JFFS2 about Sibley flash
Intels Sibley flash needs JFFS2 write buffer functionality

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06 20:13:52 +01:00
Artem B. Bityutskiy 45ca1b509e [JFFS2] Debug code clean up - step 7
Remove more noisy debugs. Add current->pid to debug messages.
Remove bogus includes.

Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06 19:14:35 +01:00
Artem B. Bityutskiy 3c09133739 [JFFS2] Correct buggy length checks
The previous changes introduced wrong length calculations.

Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06 18:35:36 +01:00
Artem B. Bityutskiy 392435081e [JFFS2] Debug code clean up - step 6
Remove extra noisy debugs

Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06 18:33:09 +01:00
Artem B. Bityutskiy 1e0da3cb6c [JFFS2] Build fragtree in reverse order
Instead of building fragtree starting from node with the smallest version
number, start from the highest. This helps to avoid reading and checking
obsolete nodes.

Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06 18:22:17 +01:00
Artem B. Bityutskiy e0e3006f79 [JFFS2] Refine fragtree debug macros
Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06 18:19:41 +01:00
Artem B. Bityutskiy 1e900979a7 [JFFS2] Move another fragtree-related function to nodelist.c
Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06 18:11:59 +01:00
Andrew Lunn 737b7661e0 [JFFS2] Fix up new debug code for eCos build
The debug code cleanup broke the eCos build.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06 18:06:10 +01:00
Artem B. Bityutskiy e0d601373b [JFFS2] Debug code clean up - step 5
Replace the D1(printk()) style debugging with the new debug macros

Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06 18:01:24 +01:00
Artem B. Bityutskiy f97117d153 [JFFS2] Move scattered function into related files
Move functions to read inodes into readinode.c
Move functions to handle fragtree and dentry lists into nodelist.[ch]

Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06 17:50:45 +01:00
Artem B. Bityutskiy f538c96ba2 [JFFS2] Debug code clean up - step 4
Small comment cleanups. Remove a unused macro

Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06 17:34:21 +01:00
Ferenc Havasi 2227c0ba4b [jffs2] Remove compressor lzo and lzari
Remove unused compressor code

Signed-off-by: Ferenc Havasi <havasi@inf.u-szeged.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06 17:31:24 +01:00
Artem B. Bityutskiy f302cd028c [JFFS2] Namespace clean up
Rename functions to a name matching the functionality.
Remove stall debug code

Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06 17:17:32 +01:00
Artem B. Bityutskiy e0c8e42f8f [JFFS2] Debug code clean up - step 3
Various simplifiactions. printk format corrections.
Convert more code to use the new debug functions.

Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06 17:06:49 +01:00
Artem B. Bityutskiy 6dac02a5e1 [JFFS2] Fix slab panic
When JFFS22 is unable to read the root inode, the bad root inode object is not
freed and remains sticked in the jffs2_i slab cache. When we further try to
free the slab cache (e.g., on rmmod jffs2), slab allocator subsystem panics.
Fix this bug.

Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06 16:31:04 +01:00
Artem B. Bityutskiy 61a39b6941 [JFFS2] Debug code clean up - step 2
If debugging is disabled, define debugging functions as empty macros, instead
of using Dx() explicitly.

Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06 16:29:43 +01:00
Artem B. Bityutskiy 2b79adcca1 [JFFS2] Use f->target instead of f->dents for symlink target
JFFS2 uses f->dents to store the pointer to the symlink target string (in case
the inode is symlink). This is somewhat ugly to use the same field for
different reasons. Introduce distinct field f->target for this purpose.
Note, f->fragtree, f->dents, f->target may probably be put in a union.

Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06 16:25:55 +01:00
Artem B. Bityutskiy 730554d946 [JFFS2] Debug code clean up - step 1
Move debug functions into a seperate source file

Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06 16:21:25 +01:00
Artem B. Bityutskiy dae6227f71 [JFFS2] Split a large routine on several smaller.
Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2005-11-06 15:40:55 +01:00
Chuck Lever 0bbacc402e NFS,SUNRPC,NLM: fix unused variable warnings when CONFIG_SYSCTL is disabled
Fix some dprintk's so that NLM, NFS client, and RPC client compile
 cleanly if CONFIG_SYSCTL is disabled.

 Test plan:
 Compile kernel with CONFIG_NFS enabled and CONFIG_SYSCTL disabled.

 Signed-off-by: Chuck Lever <cel@netapp.com>
 Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2005-11-04 15:39:48 -05:00
Trond Myklebust 6bfc93ef98 NFSv4: Teach NFSv4 to cache locks when we hold a delegation
Now that we have a method of dealing with delegation recalls, actually
 enable the caching of posix and BSD locks.

 Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2005-11-04 15:39:36 -05:00
Trond Myklebust 888e694c16 NFSv4: Recover locks too when returning a delegation
Delegations allow us to cache posix and BSD locks, however when the
 delegation is recalled, we need to "flush the cache" and send
 the cached LOCK requests to the server.

 This patch sets up the mechanism for doing so.

 Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2005-11-04 15:38:11 -05:00
Trond Myklebust 43b2a33aa8 NFSv4: Fix recovery of flock() locks.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2005-11-04 15:35:30 -05:00
Trond Myklebust 34ea818846 NFSv4: Return any delegations before sillyrenaming the file
I missed this one... Any form of rename will result in a delegation
 recall, so it is more efficient to return the one we hold before
 trying the rename.

 Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2005-11-04 15:35:02 -05:00
Trond Myklebust 2c56617d76 NFSv4: Fix the handling of the error NFS4ERR_OLD_STATEID
Ensure that we retry the failed operation...

 Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2005-11-04 15:33:50 -05:00
Trond Myklebust d530838bfa NFSv4: Fix problem with OPEN_DOWNGRADE
RFC 3530 states that for OPEN_DOWNGRADE "The share_access and share_deny
 bits specified must be exactly equal to the union of the share_access and
 share_deny bits specified for some subset of the OPENs in effect for
 current openowner on the current file.

 Setattr is currently violating the NFSv4 rules for OPEN_DOWNGRADE in that
 it may cause a downgrade from OPEN4_SHARE_ACCESS_BOTH to
 OPEN4_SHARE_ACCESS_WRITE despite the fact that there exists no open file
 with O_WRONLY access mode.

 Fix the problem by replacing nfs4_find_state() with a modified version of
 nfs_find_open_context().

 Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2005-11-04 15:33:38 -05:00
Trond Myklebust 4cecb76ff8 NFSv4: Fix a race between open() and close()
We must not remove the nfs4_state structure from the inode open lists
 before we are in sequence lock.

 Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2005-11-04 15:32:58 -05:00
Linus Torvalds 0f3278d14f Merge git://oss.sgi.com:8090/oss/git/xfs-2.6 2005-11-03 16:25:58 -08:00
Nathan Scott 15c84a4701 [XFS] Remove no-longer-used qsort source.
Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-04 10:51:01 +11:00
Nathan Scott 05db218a27 [XFS] Fix an inode32 regression - if no options are presented, must still
set default flags.

SGI-PV: 945242
SGI-Modid: xfs-linux-melb:xfs-kern:24292a

Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-04 09:49:07 +11:00
Nathan Scott 992c83a129 [XFS] Remove several no-longer-used files.
Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-03 16:50:07 +11:00
Nathan Scott 7f248a81c5 [XFS] Cleanup cosmetic differences between source trees.
Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-03 16:14:31 +11:00
Nathan Scott 538524aed0 [XFS] fix XFS quota for modular XFS builds
Cannot build XFS filesystem support as module with quota support.  It
works only when the XFS filesystem support is compiled into the kernel.
Menuconfig prevents from setting CONFIG_XFS_FS=m and CONFIG_XFS_QUOTA=y.

How to reproduce: configure the XFS filesystem with quota support as
module.  The resulting kernel won't have quota support compiled into
xfs.ko.

Fix: Changing the fs/xfs/Kconfig file from tristate to bool lets you
configure the quota support to be compiled into the XFS module.  The
Makefile-linux-2.6 checks only for CONFIG_XFS_QUOTA=y.

Signed-off-by: Dimitri Puzin <tristan-777@ddkom-online.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-03 13:55:06 +11:00
Nathan Scott de69e5f44e [XFS] Add a mechanism for XFS to use the generic quota sync method.
This is now used to issue a delayed allocation flush before reporting
quota, which allows the used space quota report to match reality.

Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-03 13:53:34 +11:00
Yingping Lu bf6f05aa0b [XFS] Fixed the inconsistency between attribute b-tree intermidiate node
and leaf blocks. The problem cam from xfsqa test 117.

SGI-PV: 940655
SGI-Modid: xfs-linux:xfs-kern:201527a

Signed-off-by: Yingping Lu <yingping@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
2005-11-03 10:31:47 +11:00