Alexander Viro [Tue, 23 Sep 2003 16:07:14 +0000 (09:07 -0700)]
[PATCH] 32-bit dev_t fixups
Argh. A couple of places where we needed ..._encode_dev() had
been lost in reordering the patchset - the most notable being ctty number in
/proc/<pid>/stat. Fix follows:
Adam Radford [Tue, 23 Sep 2003 09:27:21 +0000 (02:27 -0700)]
[PATCH] 3ware driver update
This fixes several things including fixing the character ioctl polling
to use wait_event_interruptible_timeout() instead of
interruptible_sleep_on_timeout() and several other fixes.
Alexander Viro [Tue, 23 Sep 2003 05:52:28 +0000 (22:52 -0700)]
[PATCH] 32-bit dev_t: switch-over
Real conversion to 32bit dev_t. Expansion to:
* mknod() - 32
* newstat() - 32 on 64bit platforms
* stat64() - 32 on mips, 64 on everything else (mips has weird struct
stat64 and can't get more than 32 bits). Note that right now the difference
is purely theoretical - we don't have internal values above 32 bits, so
huge_... vs. new_... only marks the places where 64bit conversion will need
extra work.
* arch-dependent stat variants - depending on width available.
* ustat et.al. - 32
* filesystems that can handle 32 bits right now - 32
* ext2 and ext3 - 32, with large dev_t inodes having 0 in the first
element of i_data[] (where we store dev_t value for small device numbers) and
keeping the value in the second element.
* nfsd - 32; it can be driven to 64, but we'll get several issues with
NFSv2 support.
* RAID - 32
* devmapper - with v1 it's still 16 (nothing to do here), with v4 it's
64.
* loop - 64
* initramfs - 32
* do_mounts code - 32. Parts that scan devfs tree are using newstat()
on 64bit platforms and stat64() on the rest (IOW, the latest stat variant on
given platform).
* old_valid_dev()/new_valid_dev() added where needed (stat variants,
mostly - we fail with -EOVERFLOW if values do not fit).
Alexander Viro [Tue, 23 Sep 2003 05:52:17 +0000 (22:52 -0700)]
[PATCH] 32-bit dev_t: internal use
Starting the conversion:
* internal dev_t made 32bit.
* new helpers - new_encode_dev(), new_decode_dev(), huge_encode_dev(),
huge_decode_dev(), new_valid_dev(). They do encoding/decoding of 32bit and
64bit values; for now huge_... are aliases for new_... and new_valid_dev()
is always true. We do 12:20 for 32bit; representation is compatible with
16bit one - we have major in bits 19--8 and minor in 31--20,7--0. That's
what the userland sees; internally we have (major << 20)|minor, of course.
* MKDEV(), MAJOR() and MINOR() updated.
* several places used to handle Missed'em'V dev_t (14:18 split)
manually; that stuff had been taken into common helpers.
Now we can start replacing old_... with new_... and huge_..., depending
on the width available. MKDEV() callers should (for now) make sure that major
and minor are within 12:20. That's what the next chunk will do.
Alexander Viro [Tue, 23 Sep 2003 05:52:09 +0000 (22:52 -0700)]
[PATCH] prepare for 32-bit dev_t: stat()
Added old_encode_dev() to assorted stat() variants.
Fixed bug in s390 emulation on s390x: stat64() should never truncate
UID and GID.
Ditto for i386 emulation on x86_64.
Replaced dev_t in various struct stat with explicit integer type.
Replaced __kernel_dev_t with __old_kernel_dev_t in dm-ioctl-v1.h
Now we are free to change dev_t in any way we want - on all boundaries
we have explicit conversions.
Took __kernel_dev_t definition to linux/types.h and changed it with
__u16. We are ready to proceed to 32bit now.
Alexander Viro [Tue, 23 Sep 2003 05:51:41 +0000 (22:51 -0700)]
[PATCH] prepare for 32-bit dev_t: mknod()/ustat()
Changed sys_mknod() prototype to have unsigned int passed to it
instead of current dev_t. Added old_decode_dev() in sys_mknod() and
made sure that its callers are passing it old_encode_dev(<value>)
Switched sys_ustat() and its variants from dev_t to unsigned (and
added old_decode_dev()).
Took care of assignments to ROOT_DEV - again, old_decode_dev().
Late-boot search in devfs (call sys_newstat() and compare with
st_rdev) also updated.
Alexander Viro [Tue, 23 Sep 2003 05:50:51 +0000 (22:50 -0700)]
[PATCH] prepare for 32-bit dev_t: NFS
NFS made dev_t-agnostic. Aside of minor fixes in debugging printks,
and adding old_encode_dev()/old_decode_dev(), the main part is in handling
of exports with large dev_t. New fhandle format introduced, fh_verify(),
fh_compose() and exports cache taught to deal with it. Format is used when
->s_dev of exported fs doesn't fit into 256:256; in that case we put major
and minor in separate words in fhandle; ->fh_fsid_type is set to 2.
Alexander Viro [Tue, 23 Sep 2003 05:50:42 +0000 (22:50 -0700)]
[PATCH] prepare for 32-bit dev_t: tty usage
tty->device had been used only in a couple of places and can be
calculated by tty->index and tty->driver. Field removed, its users switched
to static inline dev_t tty_devnum(tty).
Alexander Viro [Tue, 23 Sep 2003 05:50:33 +0000 (22:50 -0700)]
[PATCH] prepare for 32-bit dev_t: XFS
sanitized dev_t use in debugging printks in XFS, switched their
bhash to use of struct block_device, added old_encode_dev() in XFS statfs()
(it had stored dev_t in ->fs_id[0])
Alexander Viro [Tue, 23 Sep 2003 05:50:15 +0000 (22:50 -0700)]
[PATCH] prepare for 32-bit dev_t: reiserfs/procfs.c
fs/reiserfs/procfs.c made sane. It used to store dev_t of filesystem
in the proc_dir_entry->data (which is void *) and played very odd games after
that.
Switched to seq_file, stores pointer to superblock, uses sget() to
validate it, avoids use of dev_t completely.
K8 can run with a 32bit kernel too. If that's the case we have to tell
user space about it. Remove the unneeded ifdef.
In that case the CPU is called "x86-64/hammer" even on 32bit. This is
not strictly true on i386, but it's the named used by the current
oprofile user space for K8 performance counters and it would complicate
things to use different names between 32bit and 64bit.
- Fix -funit-at-a-time compilation and enable it when possible
- Remove -finline-limit as it should not be needed anymore.
- Update defconfig
- Fix Makefile bug that caused a recompilation of vsyscall.so on
every make (thanks to Sam Ravnborg)
- Add beginning of asm/dwarf2.h to support assembler CFI directives
(not complete yet)
- Remove old PDAREF macro from entry.S
- Remove clever and buggy code in sys_ioperm/set_bitmap and replace it
by simple and working code
- Don't make acpi_disabled __initdata. It is referenced after boot.
- Fix TLB size reporting in /proc/cpuinfo
- Cleanup oops printing a bit
- Add "executive summary" at end of oopses
- Reenable interrupts on oopses before calling do_exit
- Remove some unneeded prefetches. Just two are enough to kickstart
the hardware prefetcher.
- Add prefetch workaround (based on code from Richard Brunner)
- Clean up signal checking in do_page_fault
- Don't allow modify_ldt to set 64bit codesegments
- Readd SIGEV_PAD_SIZE (Stephen Rothwell)
- Add some likelys to uaccess.h (idea from Manfred Spraul)
Change ASSERT_RTNL and BUG_TRAP
- unlikely to occur
- tag message as error
- dump_stack in ASSERT_RTNL to aide finding code path
- make all format's which a smart compiler can optimize
Neil Brown [Mon, 22 Sep 2003 12:22:37 +0000 (05:22 -0700)]
[PATCH] knfsd: idempotent replay cache for OPEN state
This implements the idempotent replay cache need for NFSv4 OPEN state.
each state owner (open owner or lock owner) is required to store the
last sequence number mutating operation, and retransmit it when replayed
sequence number is presented for the operation.
I've implemented the cache as a static buffer of size 112 bytes
(NFSD4_REPLAY_ISIZE) which is large enough to hold the OPEN, the largest
of the sequence mutation operations. This implements the cache for
OPEN, OPEN_CONFIRM, OPEN_DOWNGRADE, and CLOSE. LOCK and UNLOCK will be
added when byte-range locking is done (soon!).
Neil Brown [Mon, 22 Sep 2003 12:22:28 +0000 (05:22 -0700)]
[PATCH] knfsd: NFS4XDR get rid of warning
There is a warning because of calling return with an argument on a void
function. The root cause is putting a return statement in a macro (evil
side effect).
Change ENCODE_SEQID_OP_TAIL to be a more proper macro, change all
calling functions to return void.
> That's what you are going to have to set the name file to in the
> i2c_client structure, much like your patch did. Then look at the
> different name files in each device directory to see what kind of device
> it is (chip, subclient, etc.)
OK attached patch sets all names to just chip name for chips themselves and
"chipname subclient" when subclient ios registered.