diff options
Diffstat (limited to 'fs/cramfs/README')
-rw-r--r-- | fs/cramfs/README | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/fs/cramfs/README b/fs/cramfs/README index 445d1c2d7646..9d4e7ea311f4 100644 --- a/fs/cramfs/README +++ b/fs/cramfs/README | |||
@@ -86,26 +86,26 @@ Block Size | |||
86 | 86 | ||
87 | (Block size in cramfs refers to the size of input data that is | 87 | (Block size in cramfs refers to the size of input data that is |
88 | compressed at a time. It's intended to be somewhere around | 88 | compressed at a time. It's intended to be somewhere around |
89 | PAGE_CACHE_SIZE for cramfs_readpage's convenience.) | 89 | PAGE_SIZE for cramfs_readpage's convenience.) |
90 | 90 | ||
91 | The superblock ought to indicate the block size that the fs was | 91 | The superblock ought to indicate the block size that the fs was |
92 | written for, since comments in <linux/pagemap.h> indicate that | 92 | written for, since comments in <linux/pagemap.h> indicate that |
93 | PAGE_CACHE_SIZE may grow in future (if I interpret the comment | 93 | PAGE_SIZE may grow in future (if I interpret the comment |
94 | correctly). | 94 | correctly). |
95 | 95 | ||
96 | Currently, mkcramfs #define's PAGE_CACHE_SIZE as 4096 and uses that | 96 | Currently, mkcramfs #define's PAGE_SIZE as 4096 and uses that |
97 | for blksize, whereas Linux-2.3.39 uses its PAGE_CACHE_SIZE, which in | 97 | for blksize, whereas Linux-2.3.39 uses its PAGE_SIZE, which in |
98 | turn is defined as PAGE_SIZE (which can be as large as 32KB on arm). | 98 | turn is defined as PAGE_SIZE (which can be as large as 32KB on arm). |
99 | This discrepancy is a bug, though it's not clear which should be | 99 | This discrepancy is a bug, though it's not clear which should be |
100 | changed. | 100 | changed. |
101 | 101 | ||
102 | One option is to change mkcramfs to take its PAGE_CACHE_SIZE from | 102 | One option is to change mkcramfs to take its PAGE_SIZE from |
103 | <asm/page.h>. Personally I don't like this option, but it does | 103 | <asm/page.h>. Personally I don't like this option, but it does |
104 | require the least amount of change: just change `#define | 104 | require the least amount of change: just change `#define |
105 | PAGE_CACHE_SIZE (4096)' to `#include <asm/page.h>'. The disadvantage | 105 | PAGE_SIZE (4096)' to `#include <asm/page.h>'. The disadvantage |
106 | is that the generated cramfs cannot always be shared between different | 106 | is that the generated cramfs cannot always be shared between different |
107 | kernels, not even necessarily kernels of the same architecture if | 107 | kernels, not even necessarily kernels of the same architecture if |
108 | PAGE_CACHE_SIZE is subject to change between kernel versions | 108 | PAGE_SIZE is subject to change between kernel versions |
109 | (currently possible with arm and ia64). | 109 | (currently possible with arm and ia64). |
110 | 110 | ||
111 | The remaining options try to make cramfs more sharable. | 111 | The remaining options try to make cramfs more sharable. |
@@ -126,22 +126,22 @@ size. The options are: | |||
126 | 1. Always 4096 bytes. | 126 | 1. Always 4096 bytes. |
127 | 127 | ||
128 | 2. Writer chooses blocksize; kernel adapts but rejects blocksize > | 128 | 2. Writer chooses blocksize; kernel adapts but rejects blocksize > |
129 | PAGE_CACHE_SIZE. | 129 | PAGE_SIZE. |
130 | 130 | ||
131 | 3. Writer chooses blocksize; kernel adapts even to blocksize > | 131 | 3. Writer chooses blocksize; kernel adapts even to blocksize > |
132 | PAGE_CACHE_SIZE. | 132 | PAGE_SIZE. |
133 | 133 | ||
134 | It's easy enough to change the kernel to use a smaller value than | 134 | It's easy enough to change the kernel to use a smaller value than |
135 | PAGE_CACHE_SIZE: just make cramfs_readpage read multiple blocks. | 135 | PAGE_SIZE: just make cramfs_readpage read multiple blocks. |
136 | 136 | ||
137 | The cost of option 1 is that kernels with a larger PAGE_CACHE_SIZE | 137 | The cost of option 1 is that kernels with a larger PAGE_SIZE |
138 | value don't get as good compression as they can. | 138 | value don't get as good compression as they can. |
139 | 139 | ||
140 | The cost of option 2 relative to option 1 is that the code uses | 140 | The cost of option 2 relative to option 1 is that the code uses |
141 | variables instead of #define'd constants. The gain is that people | 141 | variables instead of #define'd constants. The gain is that people |
142 | with kernels having larger PAGE_CACHE_SIZE can make use of that if | 142 | with kernels having larger PAGE_SIZE can make use of that if |
143 | they don't mind their cramfs being inaccessible to kernels with | 143 | they don't mind their cramfs being inaccessible to kernels with |
144 | smaller PAGE_CACHE_SIZE values. | 144 | smaller PAGE_SIZE values. |
145 | 145 | ||
146 | Option 3 is easy to implement if we don't mind being CPU-inefficient: | 146 | Option 3 is easy to implement if we don't mind being CPU-inefficient: |
147 | e.g. get readpage to decompress to a buffer of size MAX_BLKSIZE (which | 147 | e.g. get readpage to decompress to a buffer of size MAX_BLKSIZE (which |