| From | Subject | Date |
|---|---|---|
| Andi Drebes | [PATCH 0/2] cramfs: support for other endianness
The following patchset enables cramfs to mount images that were
created on a machine whose endianness differs from the mounting
machine's one.
Tested on an i386 box.
A discussion about this feature can be found here:
http://marc.info/?l=linux-fsdevel&m=119438573309330&w=2
Andi
-
| Nov 15, 4:29 pm 2007 |
| Andi Drebes | Re: [PATCH 0/2] cramfs: support for other endianness
I checked everything twice, except the patch numbers.
Sorry about that.
The right version of the patchset should look like this:
[PATCH 1/2] cramfs: Add mount option "swapendian"
[PATCH 2/2] cramfs: update README file
Andi
-
| Nov 15, 4:43 pm 2007 |
| Andi Drebes | [PATCH 0/2] cramfs: update README file
This patch updates the readme file according to the
new mount option "swapendian".
Signed-off-by: Andi Drebes <andi@programmierforen.de>
---
fs/cramfs/README | 21 +++++++++------------
1 files changed, 9 insertions(+), 12 deletions(-)
diff --git a/fs/cramfs/README b/fs/cramfs/README
index 445d1c2..acbbdc4 100644
--- a/fs/cramfs/README
+++ b/fs/cramfs/README
@@ -1,3 +1,12 @@
+Mount options
+-------------
+
+Currently, there is only one mount option available for cramfs:
+
+swape...
| Nov 15, 4:37 pm 2007 |
| Andi Drebes | [PATCH 0/2] cramfs: Add mount option "swapendian"
This patch introduces the mount option "swapendian" for cramfs.
When this option is set, cramfs is able to mount an image that
was created on a machine whose endianness differs from the mounting
machine's one.
If somebody tries to mount an image with another endianness but
forgets to set this option, cramfs will give a hint for it.
Signed-off-by: Andi Drebes <andi@programmierforen.de>
---
fs/cramfs/inode.c | 112 +++++++++++++++++++++++++++++++----------
include/linux/cramfs_e...
| Nov 15, 4:35 pm 2007 |
| Jörn | Re: [PATCH 0/2] cramfs: Add mount option "swapendian"
Codingstyle: extra space after "if", keep brace on the same line.
Same goes for most of this patch.
Unlikely not likely to be a good idea. It clutters up the code for a
minimal gain on host-endian filesystems (and I doubt you can measure
that even in micro-benchmarks) and forcibly mispredicts every branch for
cross-endian filesystems.
The name "endian" could be replaces with something more descriptive.
You could remove most of this by removing the mount option and simply
You're using Xe...
| Nov 15, 5:03 pm 2007 |
| Linus Torvalds | Re: [PATCH 0/2] cramfs: Add mount option "swapendian"
Please don't do it this way.
It would be *much* better to just standardize on one endianness, and be
done with it. That way there are no config options, no confusion, and the
code is smaller, simpler, and faster. Because nn unconditional byte swap
is generally faster than a conditional non-byte-swap!
So can you please just make it little-endian?
There can't be that many big-endian machines that really care about old
cramfs images..
Linus
-
| Nov 15, 4:45 pm 2007 |
| Andi Drebes | Re: [PATCH 0/2] cramfs: Add mount option "swapendian"
This is a valid objection. The problem is that the endianness for cramfs
has never been standardized. Now there are filesystem images in both little
and big endian out there. I encountered this problem first when I tried to
mount my router's initrd. Yes, I know, I could have converted the image into
little endian. I just find that it is more consistent to support both kinds
Actually, in my eyes, it would be better to create a new version of cramfs
that standardizes the endianness and the block size. B...
| Nov 15, 5:15 pm 2007 |
| Linus Torvalds | Re: [PATCH 0/2] cramfs: Add mount option "swapendian"
Perhaps even more importantly, you can do a much better job.
The thing is, when I did cramfs originally, I had a total "senior moment",
and the reason I didn't compress the metadata was that it appeared hard to
do and fill it in later (ie compressing the metadata would mean that the
location of the data changes - and since the metadata obviously contains
pointers to the data, there's a chicken-and-egg problem there).
But it should be *trivial* to compress the metadata too if the code jus...
| Nov 15, 5:37 pm 2007 |
| Phillip Lougher | Re: [PATCH 0/2] cramfs: Add mount option "swapendian"
I decided to compress the metadata when I designed Squashfs, a read-only
filesystem which was inspired by Cramfs. Squashfs stores the data at the
front of the filesystem and puts the metadata at the end, so the data is
always at a fixed point. Doing that and a couple of other things allows
the metadata to be built up and compressed in one-pass while the
filesystem is being created. The metadata is split into an inode table
and a directory table and compressed separately because it compresses...
| Nov 15, 6:48 pm 2007 |
| Christoph Hellwig | Re: [PATCH 0/2] cramfs: Add mount option "swapendian"
Actually there are as lots of initrd are cramfs. This means you'd need
to update mkcramfs all big endian machines out there.
-
| Nov 15, 4:49 pm 2007 |
| Linus Torvalds | Re: [PATCH 0/2] cramfs: Add mount option "swapendian"
So? Normally the initrd goes with the kernel anyway.
Linus
-
| Nov 15, 4:57 pm 2007 |
| Linus Torvalds | Re: [PATCH 0/2] cramfs: Add mount option "swapendian"
.. it's also statically checkable with tools like "sparse", so it avoids
bugs not only by being simpler, but by simply being fundamentally more
robust to start with.
Linus
-
| Nov 15, 4:46 pm 2007 |
| Christoph Hellwig | Re: [PATCH 0/2] cramfs: Add mount option "swapendian"
We can do proper typechecking with sparse even for dual-endian filesystems,
see ufs and sysvfs for example. And yes, for a new filesystems I'd always
chose one endianes and stick to it, but becase I certain someone forgot
that when creating cramfs we're stuck now :)
-
| Nov 15, 4:51 pm 2007 |
| Miklos Szeredi | [RFC] fuse writable mmap design
Writable shared memory mappings for fuse are something I've been
trying to implement forever.
Now hopefully I've got it all worked out, it survives indefinitely
with bash-shared-mapping and fsx-linux. And I'd like to solicit
comments about the approach.
I'm not asking for comments on the patch itself. It needs to be
cleaned and split up. It's only included for reference.
Thanks,
Miklos
Fuse page writeback design
--------------------------
fuse_writepage() allocates a new temporar...
| Nov 15, 12:10 pm 2007 |
| Peter Zijlstra | Re: [RFC] fuse writable mmap design
I'm somewhat confused by the complexity. Currently we can already have a
lot of dirty pages from FUSE (up to the per BDI dirty limit - so
basically up to the total dirty limit).
How is having them dirty from mmap'ed writes different?
-
| Nov 15, 3:22 pm 2007 |
| Miklos Szeredi | Re: [RFC] fuse writable mmap design
Nope, fuse never had dirty pages. It does normal writes
synchronously, just updating the cache.
The dirty accounting and then the per-bdi throttling basically made it
possible _at_all_ to have a chance at a writepage implementation which
is not deadlocky (so thanks for those ;).
But there's still the throttle_vm_writeout() thing, and the other
places where the kernel is waiting for a write to complete, which just
cannot be done within a constrained time if an unprivileged userspace
process is...
| Nov 15, 3:37 pm 2007 |
| Peter Zijlstra | Re: [RFC] fuse writable mmap design
Ah, ok, your initial story missed this part (not being intimately
familiar with FUSE made all that somewhat obscure).
The next point then, I'd expect your fuse_page_mkwrite() to push
writeout of your 32-odd mmap pages instead of poll.
-
| Nov 15, 3:42 pm 2007 |
| Miklos Szeredi | Re: [RFC] fuse writable mmap design
You're talking about this:
+ wait_event(fc->writeback_waitq,
+ fc->numwrite < FUSE_WRITEBACK_THRESHOLD);
right? It's one of the things I need to clean out, there's no point
in fc->numwrite, which is essentially the same as the BDI_WRITEBACK
counter.
OTOH, I'm thinking about adding a per-fs limit (adjustable for
privileged mounts) of dirty+writeback.
I'm not sure how hard would it be to add support for this into
balance_dirty_pages(). So I'm thinking of a parameter in str...
| Nov 15, 3:57 pm 2007 |
| Peter Zijlstra | Re: [RFC] fuse writable mmap design
The unused part is gone, I've not yet found a way to re-distribute this
fairly.
[ It's one of my open-problems, I can do a min_ratio per bdi, but not
yet a max_ratio ]
-
| Nov 15, 4:01 pm 2007 |
| Miklos Szeredi | Re: [RFC] fuse writable mmap design
OK, I'll bear this in mind.
Limiting the number of dirty+writeback to << dirty_thresh could still
make sense, since it could prevent a nasty filesystem from pinning
lots of kernel memory (which it can do without fuse in other ways, so
this is not very important IMO).
Miklos
-
| Nov 15, 4:11 pm 2007 |
| Jeff Layton | [PATCH] [CIFS] fix potential data corruption when there are ...
The idea here is separate "conscious" from "unconscious" flushes.
Conscious flushes are those due to a fsync() or close(). Unconscious
ones are flushes that occur as a side effect of some other operation or
due to memory pressure.
Currently, when an error occurs during an unconscious flush (ENOSPC or
EIO), we toss out the page and don't preserve that error to report to
the user when a conscious flush occurs. If after the unconscious flush,
there are no more dirty pages for the inode, the conscious ...
| Nov 15, 8:45 am 2007 |
| Greg KH | [patch 02/13] locks: fix possible infinite loop in posix dea...
-stable review patch. If anyone has any objections, please let us know.
------------------
From: J. Bruce Fields <bfields@citi.umich.edu>
patch 97855b49b6bac0bd25f16b017883634d13591d00 in mainline.
It's currently possible to send posix_locks_deadlock() into an infinite
loop (under the BKL).
For now, fix this just by bailing out after a few iterations. We may
want to fix this in a way that better clarifies the semantics of
deadlock detection. But that will take more time, and this ...
| Nov 15, 2:09 am 2007 |
| Jörn | Re: Should PAGE_CACHE_SIZE be discarded?
I did some digging. The code was merged between 28.4.1999 and
11.5.1999, as it first appears in 2.2.8 and 2.3.0:
/*
* The page cache can done in larger chunks than
* one page, because it allows for more efficient
* throughput (it can then be mapped into user
* space in smaller chunks for same flexibility).
*
* Or rather, it _will_ be done in larger chunks.
*/
#define PAGE_CACHE_SHIFT PAGE_SHIFT
#define PAGE_CACHE_SIZE PAGE_SIZE
#define PAGE_CACHE_MASK PAGE_MASK...
| Nov 15, 1:09 pm 2007 |
| David Howells | Re: Should PAGE_CACHE_SIZE be discarded?
Ummm... The filesystem has to care. If the VFS/VM says 'fill this page' you
do need to know how big the page is or whether it's even actually several
pages.
David
-
| Nov 15, 8:05 am 2007 |
| Benny Halevy | Re: Should PAGE_CACHE_SIZE be discarded?
I think that what Nick was trying to say is that PAGE_CACHE_SIZE should always
be used properly as the size of the memory struct Page covers (while PAGE_SIZE
is the hardware page size and the constraint is that PAGE_CACHE_SIZE == (PAGE_SIZE << k)
for some k >= 0). If everybody does that then "None of the filesystems should really
care at all". That said, it doesn't seem like the current usage in fs/ and drivers/
-
| Nov 15, 10:15 am 2007 |
| David Howells | Re: Should PAGE_CACHE_SIZE be discarded?
Indeed. One thing you have to consider is kmap(). I would expect it to
present an area of PAGE_SIZE for access. However, if the filesystem gets an
area of PAGE_CACHE_SIZE to fill, then I would have to do multiple kmap() calls
in the process of filling that 'pagecache page' in AFS.
Furthermore, if a page struct covers a PAGE_CACHE_SIZE chunk of memory, then I
suspect the page allocator is also wrong, as it I believe it deals with
PAGE_SIZE chunks of memory, assuming a struct page for each.
Da...
| Nov 15, 10:46 am 2007 |
| Nick Piggin | Re: Should PAGE_CACHE_SIZE be discarded?
That's because you're thinking about all these difficulties outside the
about the least problematic here.
-
| Nov 15, 5:30 pm 2007 |
| Jan Kara | Re: Beagle and logging inotify events
The kernel part has this non-determinism with hardlinks but it can be
worked-around in userspace (and actually if you watch the whole filesystem
you don't care about the non-determinism at all because you are guaranteed
there is *at least one* path which indicates the file was modified). I'm
planning to write a userspace library which would mostly hide the
problems with hardlinks (and also problems with the fact that scanner may
not have enough rights to set inode flags pointed out by Ted) from
app...
| Nov 15, 3:59 pm 2007 |
| Jon Smirl | Re: Beagle and logging inotify events
Linus made comments about it on the git list which restarted it.
Beagle's writing to the xattrs makes git think the file has been
changed. It was really a fs question not git so I forwarded it to this
group. Git wouldn't have a problem if there was a way for Beagle to
avoid using the xattrs.
Discussion of the general problem have been going on for a long time
and has caused the creation of dnofity and inotify. But the problem is
still not completely solved since there are these windows where file...
| Nov 15, 4:14 pm 2007 |
| J. Bruce Fields | Nov 15, 4:14 pm 2007 | |
| David Howells | Re: [rfc][patch 3/5] afs: new aops
That doesn't answer my question. I didn't ask about 'pagecache pages' per se.
Are you saying then that a page struct always represents an area of PAGE_SIZE
to, say, the page allocator and PAGE_CACHE_SIZE to a filesystem's address
operations?
How about I state it this way: Please define what the coverage of a
(non-compound) struct page is, and how this relates to PAGE_SIZE and
Compound pages are irrelevant to my question. A compound page is actually a
regulated by a series of page structs, e...
| Nov 15, 8:15 am 2007 |
| Nick Piggin | Re: [rfc][patch 3/5] afs: new aops
No it's easy. It's PAGE_SIZE (which also happens to be PAGE_CACHE_SIZE).
An implementation that would (not trivially, but without changing the
basic concepts) allow a larger pagecache size is with compound pages. And
I'm not talking about a specific implementation that allows
PAGE_CACHE_SIZE > PAGE_SIZE. So no, I don't say anything about that. I
say that pagecache pages are PAGE_CACHE_SIZE! Yes it is easy now because
that is the same as PAGE_SIZE. Yes it will be harder if you wanted to
ch...
| Nov 15, 5:37 pm 2007 |
| previous day | today | next day |
|---|---|---|
| November 14, 2007 | November 15, 2007 | November 16, 2007 |
| Rafael J. Wysocki | [Bug #10493] mips BCM47XX compile error |
| Ingo Molnar | [patch 02/13] syslets: add syslet.h include file, user API/ABI definitions |
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
| Andrea Arcangeli | [PATCH 00 of 11] mmu notifier #v16 |
git: | |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| Linus Torvalds | Re: [GIT]: Networking |
| Mark Lord | Re: [BUG] New Kernel Bugs |
