diff options
| author | David Woodhouse <dwmw2@dwmw2.baythorne.internal> | 2003-10-11 17:51:34 +0100 |
|---|---|---|
| committer | David Woodhouse <dwmw2@dwmw2.baythorne.internal> | 2003-10-11 17:51:34 +0100 |
| commit | 4a98f95f1d9e412805040814f5dda55b77eaee65 (patch) | |
| tree | 3d76090907f56da3dbf7969f4eadbc9f8b370087 /include/linux | |
| parent | 606e1044f4dd0044ea3c5d3e9364332b4b3cc6e1 (diff) | |
JFFS2 update; completed support for NAND flash.
- Implement write-buffer flushing by garbage collection instead of padding.
- Implement selective write-buffer flushing on fsync().
- Implement error recovery on write-buffer flush.
- Fix remove_suid(). Writing to a suid file didn't previously mark the file non-suid.
- Fix handling of full file systems, to avoid unlink() returning -ENOSPC.
- Fix assorted memory leaks.
- Improve garbage collection efficiency by merging fewer pages.
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/jffs2.h | 6 | ||||
| -rw-r--r-- | include/linux/jffs2_fs_sb.h | 24 |
2 files changed, 24 insertions, 6 deletions
diff --git a/include/linux/jffs2.h b/include/linux/jffs2.h index 2e9a2c8e4fdd..e1a49dca4abb 100644 --- a/include/linux/jffs2.h +++ b/include/linux/jffs2.h @@ -1,14 +1,14 @@ /* * JFFS2 -- Journalling Flash File System, Version 2. * - * Copyright (C) 2001, 2002 Red Hat, Inc. + * Copyright (C) 2001-2003 Red Hat, Inc. * - * Created by David Woodhouse <dwmw2@cambridge.redhat.com> + * Created by David Woodhouse <dwmw2@redhat.com> * * For licensing information, see the file 'LICENCE' in the * jffs2 directory. * - * $Id: jffs2.h,v 1.30 2003/02/15 00:15:22 dwmw2 Exp $ + * $Id: jffs2.h,v 1.31 2003/10/04 08:33:05 dwmw2 Exp $ * */ diff --git a/include/linux/jffs2_fs_sb.h b/include/linux/jffs2_fs_sb.h index 246ff237325c..ee80d2520afb 100644 --- a/include/linux/jffs2_fs_sb.h +++ b/include/linux/jffs2_fs_sb.h @@ -1,4 +1,4 @@ -/* $Id: jffs2_fs_sb.h,v 1.37 2003/01/17 16:04:44 dwmw2 Exp $ */ +/* $Id: jffs2_fs_sb.h,v 1.45 2003/10/08 11:46:27 dwmw2 Exp $ */ #ifndef _JFFS2_FS_SB #define _JFFS2_FS_SB @@ -15,6 +15,8 @@ #define JFFS2_SB_FLAG_RO 1 #define JFFS2_SB_FLAG_MOUNTING 2 +struct jffs2_inodirty; + /* A struct for the overall file system control. Pointers to jffs2_sb_info structs are named `c' in the source code. Nee jffs_control @@ -52,6 +54,15 @@ struct jffs2_sb_info { uint32_t nr_free_blocks; uint32_t nr_erasing_blocks; + /* Number of free blocks there must be before we... */ + uint8_t resv_blocks_write; /* ... allow a normal filesystem write */ + uint8_t resv_blocks_deletion; /* ... allow a normal filesystem deletion */ + uint8_t resv_blocks_gctrigger; /* ... wake up the GC thread */ + uint8_t resv_blocks_gcbad; /* ... pick a block from the bad_list to GC */ + uint8_t resv_blocks_gcmerge; /* ... merge pages when garbage collecting */ + + uint32_t nospc_dirty_size; + uint32_t nr_blocks; struct jffs2_eraseblock *blocks; /* The whole array of blocks. Used for getting blocks * from the offset (blocks[ofs / sector_size]) */ @@ -84,13 +95,20 @@ struct jffs2_sb_info { to an obsoleted node. I don't like this. Alternatives welcomed. */ struct semaphore erase_free_sem; +#ifdef CONFIG_JFFS2_FS_NAND /* Write-behind buffer for NAND flash */ unsigned char *wbuf; uint32_t wbuf_ofs; uint32_t wbuf_len; uint32_t wbuf_pagesize; - struct work_struct wbuf_task; /* task for timed wbuf flush */ - struct timer_list wbuf_timer; /* timer for flushing wbuf */ + struct jffs2_inodirty *wbuf_inodes; + + /* Information about out-of-band area usage... */ + struct nand_oobinfo *oobinfo; + uint32_t badblock_pos; + uint32_t fsdata_pos; + uint32_t fsdata_len; +#endif /* OS-private pointer for getting back to master superblock info */ void *os_priv; |
