Merge with master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
This commit is contained in:
commit
27b030d58c
527 changed files with 7926 additions and 5937 deletions
|
@ -23,7 +23,7 @@
|
|||
#define AUTOFS_MIN_PROTO_VERSION 3
|
||||
#define AUTOFS_MAX_PROTO_VERSION 4
|
||||
|
||||
#define AUTOFS_PROTO_SUBVERSION 5
|
||||
#define AUTOFS_PROTO_SUBVERSION 6
|
||||
|
||||
/* Mask for expire behaviour */
|
||||
#define AUTOFS_EXP_IMMEDIATE 1
|
||||
|
|
|
@ -22,3 +22,8 @@
|
|||
# define __attribute_pure__ __attribute__((pure))
|
||||
# define __attribute_const__ __attribute__((__const__))
|
||||
#endif
|
||||
|
||||
/* GCC 2.95.x/2.96 recognize __va_copy, but not va_copy. Actually later GCC's
|
||||
* define both va_copy and __va_copy, but the latter may go away, so limit this
|
||||
* to this header */
|
||||
#define va_copy __va_copy
|
||||
|
|
|
@ -90,6 +90,12 @@ extern void __chk_io_ptr(void __iomem *);
|
|||
# define __deprecated /* unimplemented */
|
||||
#endif
|
||||
|
||||
#ifdef MODULE
|
||||
#define __deprecated_for_modules __deprecated
|
||||
#else
|
||||
#define __deprecated_for_modules
|
||||
#endif
|
||||
|
||||
#ifndef __must_check
|
||||
#define __must_check
|
||||
#endif
|
||||
|
|
|
@ -103,6 +103,7 @@ struct cpufreq_policy {
|
|||
#define CPUFREQ_PRECHANGE (0)
|
||||
#define CPUFREQ_POSTCHANGE (1)
|
||||
#define CPUFREQ_RESUMECHANGE (8)
|
||||
#define CPUFREQ_SUSPENDCHANGE (9)
|
||||
|
||||
struct cpufreq_freqs {
|
||||
unsigned int cpu; /* cpu nr */
|
||||
|
@ -200,6 +201,7 @@ struct cpufreq_driver {
|
|||
|
||||
/* optional */
|
||||
int (*exit) (struct cpufreq_policy *policy);
|
||||
int (*suspend) (struct cpufreq_policy *policy, u32 state);
|
||||
int (*resume) (struct cpufreq_policy *policy);
|
||||
struct freq_attr **attr;
|
||||
};
|
||||
|
@ -211,7 +213,8 @@ struct cpufreq_driver {
|
|||
#define CPUFREQ_CONST_LOOPS 0x02 /* loops_per_jiffy or other kernel
|
||||
* "constants" aren't affected by
|
||||
* frequency transitions */
|
||||
|
||||
#define CPUFREQ_PM_NO_WARN 0x04 /* don't warn on suspend/resume speed
|
||||
* mismatches */
|
||||
|
||||
int cpufreq_register_driver(struct cpufreq_driver *driver_data);
|
||||
int cpufreq_unregister_driver(struct cpufreq_driver *driver_data);
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
|
||||
#define EDDNR 0x1e9 /* addr of number of edd_info structs at EDDBUF
|
||||
in boot_params - treat this as 1 byte */
|
||||
#define EDDBUF 0x600 /* addr of edd_info structs in boot_params */
|
||||
#define EDDBUF 0xd00 /* addr of edd_info structs in boot_params */
|
||||
#define EDDMAXNR 6 /* number of edd_info structs starting at EDDBUF */
|
||||
#define EDDEXTSIZE 8 /* change these if you muck with the structures */
|
||||
#define EDDPARMSIZE 74
|
||||
|
|
|
@ -563,6 +563,9 @@ struct fb_ops {
|
|||
int (*fb_setcolreg)(unsigned regno, unsigned red, unsigned green,
|
||||
unsigned blue, unsigned transp, struct fb_info *info);
|
||||
|
||||
/* set color registers in batch */
|
||||
int (*fb_setcmap)(struct fb_cmap *cmap, struct fb_info *info);
|
||||
|
||||
/* blank display */
|
||||
int (*fb_blank)(int blank, struct fb_info *info);
|
||||
|
||||
|
|
|
@ -1053,83 +1053,87 @@ static inline void file_accessed(struct file *file)
|
|||
int sync_inode(struct inode *inode, struct writeback_control *wbc);
|
||||
|
||||
/**
|
||||
* &export_operations - for nfsd to communicate with file systems
|
||||
* decode_fh: decode a file handle fragment and return a &struct dentry
|
||||
* encode_fh: encode a file handle fragment from a dentry
|
||||
* get_name: find the name for a given inode in a given directory
|
||||
* get_parent: find the parent of a given directory
|
||||
* get_dentry: find a dentry for the inode given a file handle sub-fragment
|
||||
* struct export_operations - for nfsd to communicate with file systems
|
||||
* @decode_fh: decode a file handle fragment and return a &struct dentry
|
||||
* @encode_fh: encode a file handle fragment from a dentry
|
||||
* @get_name: find the name for a given inode in a given directory
|
||||
* @get_parent: find the parent of a given directory
|
||||
* @get_dentry: find a dentry for the inode given a file handle sub-fragment
|
||||
*
|
||||
* Description:
|
||||
* The export_operations structure provides a means for nfsd to communicate
|
||||
* with a particular exported file system - particularly enabling nfsd and
|
||||
* the filesystem to co-operate when dealing with file handles.
|
||||
*
|
||||
* export_operations contains two basic operation for dealing with file handles,
|
||||
* decode_fh() and encode_fh(), and allows for some other operations to be defined
|
||||
* which standard helper routines use to get specific information from the
|
||||
* filesystem.
|
||||
* export_operations contains two basic operation for dealing with file
|
||||
* handles, decode_fh() and encode_fh(), and allows for some other
|
||||
* operations to be defined which standard helper routines use to get
|
||||
* specific information from the filesystem.
|
||||
*
|
||||
* nfsd encodes information use to determine which filesystem a filehandle
|
||||
* applies to in the initial part of the file handle. The remainder, termed a
|
||||
* file handle fragment, is controlled completely by the filesystem.
|
||||
* The standard helper routines assume that this fragment will contain one or two
|
||||
* sub-fragments, one which identifies the file, and one which may be used to
|
||||
* identify the (a) directory containing the file.
|
||||
* applies to in the initial part of the file handle. The remainder, termed
|
||||
* a file handle fragment, is controlled completely by the filesystem. The
|
||||
* standard helper routines assume that this fragment will contain one or
|
||||
* two sub-fragments, one which identifies the file, and one which may be
|
||||
* used to identify the (a) directory containing the file.
|
||||
*
|
||||
* In some situations, nfsd needs to get a dentry which is connected into a
|
||||
* specific part of the file tree. To allow for this, it passes the function
|
||||
* acceptable() together with a @context which can be used to see if the dentry
|
||||
* is acceptable. As there can be multiple dentrys for a given file, the filesystem
|
||||
* should check each one for acceptability before looking for the next. As soon
|
||||
* as an acceptable one is found, it should be returned.
|
||||
* specific part of the file tree. To allow for this, it passes the
|
||||
* function acceptable() together with a @context which can be used to see
|
||||
* if the dentry is acceptable. As there can be multiple dentrys for a
|
||||
* given file, the filesystem should check each one for acceptability before
|
||||
* looking for the next. As soon as an acceptable one is found, it should
|
||||
* be returned.
|
||||
*
|
||||
* decode_fh:
|
||||
* @decode_fh is given a &struct super_block (@sb), a file handle fragment (@fh, @fh_len)
|
||||
* and an acceptability testing function (@acceptable, @context). It should return
|
||||
* a &struct dentry which refers to the same file that the file handle fragment refers
|
||||
* to, and which passes the acceptability test. If it cannot, it should return
|
||||
* a %NULL pointer if the file was found but no acceptable &dentries were available, or
|
||||
* a %ERR_PTR error code indicating why it couldn't be found (e.g. %ENOENT or %ENOMEM).
|
||||
* @decode_fh is given a &struct super_block (@sb), a file handle fragment
|
||||
* (@fh, @fh_len) and an acceptability testing function (@acceptable,
|
||||
* @context). It should return a &struct dentry which refers to the same
|
||||
* file that the file handle fragment refers to, and which passes the
|
||||
* acceptability test. If it cannot, it should return a %NULL pointer if
|
||||
* the file was found but no acceptable &dentries were available, or a
|
||||
* %ERR_PTR error code indicating why it couldn't be found (e.g. %ENOENT or
|
||||
* %ENOMEM).
|
||||
*
|
||||
* encode_fh:
|
||||
* @encode_fh should store in the file handle fragment @fh (using at most @max_len bytes)
|
||||
* information that can be used by @decode_fh to recover the file refered to by the
|
||||
* &struct dentry @de. If the @connectable flag is set, the encode_fh() should store
|
||||
* sufficient information so that a good attempt can be made to find not only
|
||||
* the file but also it's place in the filesystem. This typically means storing
|
||||
* a reference to de->d_parent in the filehandle fragment.
|
||||
* encode_fh() should return the number of bytes stored or a negative error code
|
||||
* such as %-ENOSPC
|
||||
* @encode_fh should store in the file handle fragment @fh (using at most
|
||||
* @max_len bytes) information that can be used by @decode_fh to recover the
|
||||
* file refered to by the &struct dentry @de. If the @connectable flag is
|
||||
* set, the encode_fh() should store sufficient information so that a good
|
||||
* attempt can be made to find not only the file but also it's place in the
|
||||
* filesystem. This typically means storing a reference to de->d_parent in
|
||||
* the filehandle fragment. encode_fh() should return the number of bytes
|
||||
* stored or a negative error code such as %-ENOSPC
|
||||
*
|
||||
* get_name:
|
||||
* @get_name should find a name for the given @child in the given @parent directory.
|
||||
* The name should be stored in the @name (with the understanding that it is already
|
||||
* pointing to a a %NAME_MAX+1 sized buffer. get_name() should return %0 on success,
|
||||
* a negative error code or error.
|
||||
* @get_name will be called without @parent->i_sem held.
|
||||
* @get_name should find a name for the given @child in the given @parent
|
||||
* directory. The name should be stored in the @name (with the
|
||||
* understanding that it is already pointing to a a %NAME_MAX+1 sized
|
||||
* buffer. get_name() should return %0 on success, a negative error code
|
||||
* or error. @get_name will be called without @parent->i_sem held.
|
||||
*
|
||||
* get_parent:
|
||||
* @get_parent should find the parent directory for the given @child which is also
|
||||
* a directory. In the event that it cannot be found, or storage space cannot be
|
||||
* allocated, a %ERR_PTR should be returned.
|
||||
* @get_parent should find the parent directory for the given @child which
|
||||
* is also a directory. In the event that it cannot be found, or storage
|
||||
* space cannot be allocated, a %ERR_PTR should be returned.
|
||||
*
|
||||
* get_dentry:
|
||||
* Given a &super_block (@sb) and a pointer to a file-system specific inode identifier,
|
||||
* possibly an inode number, (@inump) get_dentry() should find the identified inode and
|
||||
* return a dentry for that inode.
|
||||
* Any suitable dentry can be returned including, if necessary, a new dentry created
|
||||
* with d_alloc_root. The caller can then find any other extant dentrys by following the
|
||||
* d_alias links. If a new dentry was created using d_alloc_root, DCACHE_NFSD_DISCONNECTED
|
||||
* should be set, and the dentry should be d_rehash()ed.
|
||||
* Given a &super_block (@sb) and a pointer to a file-system specific inode
|
||||
* identifier, possibly an inode number, (@inump) get_dentry() should find
|
||||
* the identified inode and return a dentry for that inode. Any suitable
|
||||
* dentry can be returned including, if necessary, a new dentry created with
|
||||
* d_alloc_root. The caller can then find any other extant dentrys by
|
||||
* following the d_alias links. If a new dentry was created using
|
||||
* d_alloc_root, DCACHE_NFSD_DISCONNECTED should be set, and the dentry
|
||||
* should be d_rehash()ed.
|
||||
*
|
||||
* If the inode cannot be found, either a %NULL pointer or an %ERR_PTR code can be returned.
|
||||
* The @inump will be whatever was passed to nfsd_find_fh_dentry() in either the
|
||||
* @obj or @parent parameters.
|
||||
* If the inode cannot be found, either a %NULL pointer or an %ERR_PTR code
|
||||
* can be returned. The @inump will be whatever was passed to
|
||||
* nfsd_find_fh_dentry() in either the @obj or @parent parameters.
|
||||
*
|
||||
* Locking rules:
|
||||
* get_parent is called with child->d_inode->i_sem down
|
||||
* get_name is not (which is possibly inconsistent)
|
||||
* get_parent is called with child->d_inode->i_sem down
|
||||
* get_name is not (which is possibly inconsistent)
|
||||
*/
|
||||
|
||||
struct export_operations {
|
||||
|
|
|
@ -38,14 +38,16 @@ struct vm_area_struct;
|
|||
#define __GFP_NO_GROW 0x2000u /* Slab internal usage */
|
||||
#define __GFP_COMP 0x4000u /* Add compound page metadata */
|
||||
#define __GFP_ZERO 0x8000u /* Return zeroed page on success */
|
||||
#define __GFP_NOMEMALLOC 0x10000u /* Don't use emergency reserves */
|
||||
|
||||
#define __GFP_BITS_SHIFT 16 /* Room for 16 __GFP_FOO bits */
|
||||
#define __GFP_BITS_SHIFT 20 /* Room for 20 __GFP_FOO bits */
|
||||
#define __GFP_BITS_MASK ((1 << __GFP_BITS_SHIFT) - 1)
|
||||
|
||||
/* if you forget to add the bitmask here kernel will crash, period */
|
||||
#define GFP_LEVEL_MASK (__GFP_WAIT|__GFP_HIGH|__GFP_IO|__GFP_FS| \
|
||||
__GFP_COLD|__GFP_NOWARN|__GFP_REPEAT| \
|
||||
__GFP_NOFAIL|__GFP_NORETRY|__GFP_NO_GROW|__GFP_COMP)
|
||||
__GFP_NOFAIL|__GFP_NORETRY|__GFP_NO_GROW|__GFP_COMP| \
|
||||
__GFP_NOMEMALLOC)
|
||||
|
||||
#define GFP_ATOMIC (__GFP_HIGH)
|
||||
#define GFP_NOIO (__GFP_WAIT)
|
||||
|
|
|
@ -328,6 +328,11 @@ struct input_absinfo {
|
|||
#define KEY_BRIGHTNESSUP 225
|
||||
#define KEY_MEDIA 226
|
||||
|
||||
#define KEY_SWITCHVIDEOMODE 227
|
||||
#define KEY_KBDILLUMTOGGLE 228
|
||||
#define KEY_KBDILLUMDOWN 229
|
||||
#define KEY_KBDILLUMUP 230
|
||||
|
||||
#define KEY_UNKNOWN 240
|
||||
|
||||
#define BTN_MISC 0x100
|
||||
|
|
|
@ -115,10 +115,19 @@ extern int __kernel_text_address(unsigned long addr);
|
|||
extern int kernel_text_address(unsigned long addr);
|
||||
extern int session_of_pgrp(int pgrp);
|
||||
|
||||
#ifdef CONFIG_PRINTK
|
||||
asmlinkage int vprintk(const char *fmt, va_list args)
|
||||
__attribute__ ((format (printf, 1, 0)));
|
||||
asmlinkage int printk(const char * fmt, ...)
|
||||
__attribute__ ((format (printf, 1, 2)));
|
||||
#else
|
||||
static inline int vprintk(const char *s, va_list args)
|
||||
__attribute__ ((format (printf, 1, 0)));
|
||||
static inline int vprintk(const char *s, va_list args) { return 0; }
|
||||
static inline int printk(const char *s, ...)
|
||||
__attribute__ ((format (printf, 1, 2)));
|
||||
static inline int printk(const char *s, ...) { return 0; }
|
||||
#endif
|
||||
|
||||
unsigned long int_sqrt(unsigned long);
|
||||
|
||||
|
|
|
@ -726,6 +726,7 @@ extern void __vma_link_rb(struct mm_struct *, struct vm_area_struct *,
|
|||
extern struct vm_area_struct *copy_vma(struct vm_area_struct **,
|
||||
unsigned long addr, unsigned long len, pgoff_t pgoff);
|
||||
extern void exit_mmap(struct mm_struct *);
|
||||
extern int may_expand_vm(struct mm_struct *mm, unsigned long npages);
|
||||
|
||||
extern unsigned long get_unmapped_area(struct file *, unsigned long, unsigned long, unsigned long, unsigned long);
|
||||
|
||||
|
|
|
@ -64,19 +64,19 @@ typedef enum {
|
|||
#define SOCK_PASSCRED 3
|
||||
|
||||
#ifndef ARCH_HAS_SOCKET_TYPES
|
||||
/** sock_type - Socket types
|
||||
*
|
||||
/**
|
||||
* enum sock_type - Socket types
|
||||
* @SOCK_STREAM: stream (connection) socket
|
||||
* @SOCK_DGRAM: datagram (conn.less) socket
|
||||
* @SOCK_RAW: raw socket
|
||||
* @SOCK_RDM: reliably-delivered message
|
||||
* @SOCK_SEQPACKET: sequential packet socket
|
||||
* @SOCK_PACKET: linux specific way of getting packets at the dev level.
|
||||
* For writing rarp and other similar things on the user level.
|
||||
*
|
||||
* When adding some new socket type please
|
||||
* grep ARCH_HAS_SOCKET_TYPE include/asm-* /socket.h, at least MIPS
|
||||
* overrides this enum for binary compat reasons.
|
||||
*
|
||||
* @SOCK_STREAM - stream (connection) socket
|
||||
* @SOCK_DGRAM - datagram (conn.less) socket
|
||||
* @SOCK_RAW - raw socket
|
||||
* @SOCK_RDM - reliably-delivered message
|
||||
* @SOCK_SEQPACKET - sequential packet socket
|
||||
* @SOCK_PACKET - linux specific way of getting packets at the dev level.
|
||||
* For writing rarp and other similar things on the user level.
|
||||
*/
|
||||
enum sock_type {
|
||||
SOCK_STREAM = 1,
|
||||
|
@ -93,15 +93,15 @@ enum sock_type {
|
|||
|
||||
/**
|
||||
* struct socket - general BSD socket
|
||||
* @state - socket state (%SS_CONNECTED, etc)
|
||||
* @flags - socket flags (%SOCK_ASYNC_NOSPACE, etc)
|
||||
* @ops - protocol specific socket operations
|
||||
* @fasync_list - Asynchronous wake up list
|
||||
* @file - File back pointer for gc
|
||||
* @sk - internal networking protocol agnostic socket representation
|
||||
* @wait - wait queue for several uses
|
||||
* @type - socket type (%SOCK_STREAM, etc)
|
||||
* @passcred - credentials (used only in Unix Sockets (aka PF_LOCAL))
|
||||
* @state: socket state (%SS_CONNECTED, etc)
|
||||
* @flags: socket flags (%SOCK_ASYNC_NOSPACE, etc)
|
||||
* @ops: protocol specific socket operations
|
||||
* @fasync_list: Asynchronous wake up list
|
||||
* @file: File back pointer for gc
|
||||
* @sk: internal networking protocol agnostic socket representation
|
||||
* @wait: wait queue for several uses
|
||||
* @type: socket type (%SOCK_STREAM, etc)
|
||||
* @passcred: credentials (used only in Unix Sockets (aka PF_LOCAL))
|
||||
*/
|
||||
struct socket {
|
||||
socket_state state;
|
||||
|
|
|
@ -131,6 +131,7 @@ struct page_state {
|
|||
unsigned long allocstall; /* direct reclaim calls */
|
||||
|
||||
unsigned long pgrotated; /* pages rotated to tail of the LRU */
|
||||
unsigned long nr_bounce; /* pages for bounce buffers */
|
||||
};
|
||||
|
||||
extern void get_page_state(struct page_state *ret);
|
||||
|
|
|
@ -2415,6 +2415,8 @@
|
|||
#define PCI_DEVICE_ID_INTEL_ICH7_1 0x27b9
|
||||
#define PCI_DEVICE_ID_INTEL_ICH7_2 0x27c0
|
||||
#define PCI_DEVICE_ID_INTEL_ICH7_3 0x27c1
|
||||
#define PCI_DEVICE_ID_INTEL_ICH7_30 0x27b0
|
||||
#define PCI_DEVICE_ID_INTEL_ICH7_31 0x27bd
|
||||
#define PCI_DEVICE_ID_INTEL_ICH7_5 0x27c4
|
||||
#define PCI_DEVICE_ID_INTEL_ICH7_6 0x27c5
|
||||
#define PCI_DEVICE_ID_INTEL_ICH7_7 0x27c8
|
||||
|
|
|
@ -157,9 +157,9 @@ static inline int rcu_pending(int cpu)
|
|||
/**
|
||||
* rcu_read_lock - mark the beginning of an RCU read-side critical section.
|
||||
*
|
||||
* When synchronize_kernel() is invoked on one CPU while other CPUs
|
||||
* When synchronize_rcu() is invoked on one CPU while other CPUs
|
||||
* are within RCU read-side critical sections, then the
|
||||
* synchronize_kernel() is guaranteed to block until after all the other
|
||||
* synchronize_rcu() is guaranteed to block until after all the other
|
||||
* CPUs exit their critical sections. Similarly, if call_rcu() is invoked
|
||||
* on one CPU while other CPUs are within RCU read-side critical
|
||||
* sections, invocation of the corresponding RCU callback is deferred
|
||||
|
@ -256,6 +256,21 @@ static inline int rcu_pending(int cpu)
|
|||
(p) = (v); \
|
||||
})
|
||||
|
||||
/**
|
||||
* synchronize_sched - block until all CPUs have exited any non-preemptive
|
||||
* kernel code sequences.
|
||||
*
|
||||
* This means that all preempt_disable code sequences, including NMI and
|
||||
* hardware-interrupt handlers, in progress on entry will have completed
|
||||
* before this primitive returns. However, this does not guarantee that
|
||||
* softirq handlers will have completed, since in some kernels
|
||||
*
|
||||
* This primitive provides the guarantees made by the (deprecated)
|
||||
* synchronize_kernel() API. In contrast, synchronize_rcu() only
|
||||
* guarantees that rcu_read_lock() sections will have completed.
|
||||
*/
|
||||
#define synchronize_sched() synchronize_rcu()
|
||||
|
||||
extern void rcu_init(void);
|
||||
extern void rcu_check_callbacks(int cpu, int user);
|
||||
extern void rcu_restart_cpu(int cpu);
|
||||
|
@ -265,7 +280,9 @@ extern void FASTCALL(call_rcu(struct rcu_head *head,
|
|||
void (*func)(struct rcu_head *head)));
|
||||
extern void FASTCALL(call_rcu_bh(struct rcu_head *head,
|
||||
void (*func)(struct rcu_head *head)));
|
||||
extern void synchronize_kernel(void);
|
||||
extern __deprecated_for_modules void synchronize_kernel(void);
|
||||
extern void synchronize_rcu(void);
|
||||
void synchronize_idle(void);
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
#endif /* __LINUX_RCUPDATE_H */
|
||||
|
|
10
include/linux/reboot_fixups.h
Normal file
10
include/linux/reboot_fixups.h
Normal file
|
@ -0,0 +1,10 @@
|
|||
#ifndef _LINUX_REBOOT_FIXUPS_H
|
||||
#define _LINUX_REBOOT_FIXUPS_H
|
||||
|
||||
#ifdef CONFIG_X86_REBOOTFIXUPS
|
||||
extern void mach_reboot_fixups(void);
|
||||
#else
|
||||
#define mach_reboot_fixups() ((void)(0))
|
||||
#endif
|
||||
|
||||
#endif /* _LINUX_REBOOT_FIXUPS_H */
|
|
@ -5,18 +5,18 @@
|
|||
#define REISERFS_ACL_VERSION 0x0001
|
||||
|
||||
typedef struct {
|
||||
__u16 e_tag;
|
||||
__u16 e_perm;
|
||||
__u32 e_id;
|
||||
__le16 e_tag;
|
||||
__le16 e_perm;
|
||||
__le32 e_id;
|
||||
} reiserfs_acl_entry;
|
||||
|
||||
typedef struct {
|
||||
__u16 e_tag;
|
||||
__u16 e_perm;
|
||||
__le16 e_tag;
|
||||
__le16 e_perm;
|
||||
} reiserfs_acl_entry_short;
|
||||
|
||||
typedef struct {
|
||||
__u32 a_version;
|
||||
__le32 a_version;
|
||||
} reiserfs_acl_header;
|
||||
|
||||
static inline size_t reiserfs_acl_size(int count)
|
||||
|
|
|
@ -114,47 +114,47 @@ if( !( cond ) ) \
|
|||
|
||||
|
||||
struct journal_params {
|
||||
__u32 jp_journal_1st_block; /* where does journal start from on its
|
||||
__le32 jp_journal_1st_block; /* where does journal start from on its
|
||||
* device */
|
||||
__u32 jp_journal_dev; /* journal device st_rdev */
|
||||
__u32 jp_journal_size; /* size of the journal */
|
||||
__u32 jp_journal_trans_max; /* max number of blocks in a transaction. */
|
||||
__u32 jp_journal_magic; /* random value made on fs creation (this
|
||||
__le32 jp_journal_dev; /* journal device st_rdev */
|
||||
__le32 jp_journal_size; /* size of the journal */
|
||||
__le32 jp_journal_trans_max; /* max number of blocks in a transaction. */
|
||||
__le32 jp_journal_magic; /* random value made on fs creation (this
|
||||
* was sb_journal_block_count) */
|
||||
__u32 jp_journal_max_batch; /* max number of blocks to batch into a
|
||||
__le32 jp_journal_max_batch; /* max number of blocks to batch into a
|
||||
* trans */
|
||||
__u32 jp_journal_max_commit_age; /* in seconds, how old can an async
|
||||
__le32 jp_journal_max_commit_age; /* in seconds, how old can an async
|
||||
* commit be */
|
||||
__u32 jp_journal_max_trans_age; /* in seconds, how old can a transaction
|
||||
__le32 jp_journal_max_trans_age; /* in seconds, how old can a transaction
|
||||
* be */
|
||||
};
|
||||
|
||||
/* this is the super from 3.5.X, where X >= 10 */
|
||||
struct reiserfs_super_block_v1
|
||||
{
|
||||
__u32 s_block_count; /* blocks count */
|
||||
__u32 s_free_blocks; /* free blocks count */
|
||||
__u32 s_root_block; /* root block number */
|
||||
__le32 s_block_count; /* blocks count */
|
||||
__le32 s_free_blocks; /* free blocks count */
|
||||
__le32 s_root_block; /* root block number */
|
||||
struct journal_params s_journal;
|
||||
__u16 s_blocksize; /* block size */
|
||||
__u16 s_oid_maxsize; /* max size of object id array, see
|
||||
__le16 s_blocksize; /* block size */
|
||||
__le16 s_oid_maxsize; /* max size of object id array, see
|
||||
* get_objectid() commentary */
|
||||
__u16 s_oid_cursize; /* current size of object id array */
|
||||
__u16 s_umount_state; /* this is set to 1 when filesystem was
|
||||
__le16 s_oid_cursize; /* current size of object id array */
|
||||
__le16 s_umount_state; /* this is set to 1 when filesystem was
|
||||
* umounted, to 2 - when not */
|
||||
char s_magic[10]; /* reiserfs magic string indicates that
|
||||
* file system is reiserfs:
|
||||
* "ReIsErFs" or "ReIsEr2Fs" or "ReIsEr3Fs" */
|
||||
__u16 s_fs_state; /* it is set to used by fsck to mark which
|
||||
__le16 s_fs_state; /* it is set to used by fsck to mark which
|
||||
* phase of rebuilding is done */
|
||||
__u32 s_hash_function_code; /* indicate, what hash function is being use
|
||||
__le32 s_hash_function_code; /* indicate, what hash function is being use
|
||||
* to sort names in a directory*/
|
||||
__u16 s_tree_height; /* height of disk tree */
|
||||
__u16 s_bmap_nr; /* amount of bitmap blocks needed to address
|
||||
__le16 s_tree_height; /* height of disk tree */
|
||||
__le16 s_bmap_nr; /* amount of bitmap blocks needed to address
|
||||
* each block of file system */
|
||||
__u16 s_version; /* this field is only reliable on filesystem
|
||||
__le16 s_version; /* this field is only reliable on filesystem
|
||||
* with non-standard journal */
|
||||
__u16 s_reserved_for_journal; /* size in blocks of journal area on main
|
||||
__le16 s_reserved_for_journal; /* size in blocks of journal area on main
|
||||
* device, we need to keep after
|
||||
* making fs with non-standard journal */
|
||||
} __attribute__ ((__packed__));
|
||||
|
@ -165,8 +165,8 @@ struct reiserfs_super_block_v1
|
|||
struct reiserfs_super_block
|
||||
{
|
||||
struct reiserfs_super_block_v1 s_v1;
|
||||
__u32 s_inode_generation;
|
||||
__u32 s_flags; /* Right now used only by inode-attributes, if enabled */
|
||||
__le32 s_inode_generation;
|
||||
__le32 s_flags; /* Right now used only by inode-attributes, if enabled */
|
||||
unsigned char s_uuid[16]; /* filesystem unique identifier */
|
||||
unsigned char s_label[16]; /* filesystem volume label */
|
||||
char s_unused[88] ; /* zero filled by mkreiserfs and
|
||||
|
@ -225,7 +225,7 @@ struct reiserfs_super_block
|
|||
#define SB_ONDISK_JOURNAL_DEVICE(s) \
|
||||
le32_to_cpu ((SB_ONDISK_JP(s)->jp_journal_dev))
|
||||
#define SB_ONDISK_RESERVED_FOR_JOURNAL(s) \
|
||||
le32_to_cpu ((SB_V1_DISK_SUPER_BLOCK(s)->s_reserved_for_journal))
|
||||
le16_to_cpu ((SB_V1_DISK_SUPER_BLOCK(s)->s_reserved_for_journal))
|
||||
|
||||
#define is_block_in_log_or_reserved_area(s, block) \
|
||||
block >= SB_JOURNAL_1st_RESERVED_BLOCK(s) \
|
||||
|
@ -269,7 +269,7 @@ int is_reiserfs_jr (struct reiserfs_super_block * rs);
|
|||
#define QUOTA_EXCEEDED -6
|
||||
|
||||
typedef __u32 b_blocknr_t;
|
||||
typedef __u32 unp_t;
|
||||
typedef __le32 unp_t;
|
||||
|
||||
struct unfm_nodeinfo {
|
||||
unp_t unfm_nodenum;
|
||||
|
@ -376,78 +376,57 @@ static inline struct reiserfs_sb_info *REISERFS_SB(const struct super_block *sb)
|
|||
// directories use this key as well as old files
|
||||
//
|
||||
struct offset_v1 {
|
||||
__u32 k_offset;
|
||||
__u32 k_uniqueness;
|
||||
__le32 k_offset;
|
||||
__le32 k_uniqueness;
|
||||
} __attribute__ ((__packed__));
|
||||
|
||||
struct offset_v2 {
|
||||
#ifdef __LITTLE_ENDIAN
|
||||
/* little endian version */
|
||||
__u64 k_offset:60;
|
||||
__u64 k_type: 4;
|
||||
#else
|
||||
/* big endian version */
|
||||
__u64 k_type: 4;
|
||||
__u64 k_offset:60;
|
||||
#endif
|
||||
__le64 v;
|
||||
} __attribute__ ((__packed__));
|
||||
|
||||
#ifndef __LITTLE_ENDIAN
|
||||
typedef union {
|
||||
struct offset_v2 offset_v2;
|
||||
__u64 linear;
|
||||
} __attribute__ ((__packed__)) offset_v2_esafe_overlay;
|
||||
|
||||
static inline __u16 offset_v2_k_type( const struct offset_v2 *v2 )
|
||||
{
|
||||
offset_v2_esafe_overlay tmp = *(const offset_v2_esafe_overlay *)v2;
|
||||
tmp.linear = le64_to_cpu( tmp.linear );
|
||||
return (tmp.offset_v2.k_type <= TYPE_MAXTYPE)?tmp.offset_v2.k_type:TYPE_ANY;
|
||||
__u8 type = le64_to_cpu(v2->v) >> 60;
|
||||
return (type <= TYPE_MAXTYPE)?type:TYPE_ANY;
|
||||
}
|
||||
|
||||
static inline void set_offset_v2_k_type( struct offset_v2 *v2, int type )
|
||||
{
|
||||
offset_v2_esafe_overlay *tmp = (offset_v2_esafe_overlay *)v2;
|
||||
tmp->linear = le64_to_cpu(tmp->linear);
|
||||
tmp->offset_v2.k_type = type;
|
||||
tmp->linear = cpu_to_le64(tmp->linear);
|
||||
v2->v = (v2->v & cpu_to_le64(~0ULL>>4)) | cpu_to_le64((__u64)type<<60);
|
||||
}
|
||||
|
||||
static inline loff_t offset_v2_k_offset( const struct offset_v2 *v2 )
|
||||
{
|
||||
offset_v2_esafe_overlay tmp = *(const offset_v2_esafe_overlay *)v2;
|
||||
tmp.linear = le64_to_cpu( tmp.linear );
|
||||
return tmp.offset_v2.k_offset;
|
||||
return le64_to_cpu(v2->v) & (~0ULL>>4);
|
||||
}
|
||||
|
||||
static inline void set_offset_v2_k_offset( struct offset_v2 *v2, loff_t offset ){
|
||||
offset_v2_esafe_overlay *tmp = (offset_v2_esafe_overlay *)v2;
|
||||
tmp->linear = le64_to_cpu(tmp->linear);
|
||||
tmp->offset_v2.k_offset = offset;
|
||||
tmp->linear = cpu_to_le64(tmp->linear);
|
||||
offset &= (~0ULL>>4);
|
||||
v2->v = (v2->v & cpu_to_le64(15ULL<<60)) | cpu_to_le64(offset);
|
||||
}
|
||||
#else
|
||||
# define offset_v2_k_type(v2) ((v2)->k_type)
|
||||
# define set_offset_v2_k_type(v2,val) (offset_v2_k_type(v2) = (val))
|
||||
# define offset_v2_k_offset(v2) ((v2)->k_offset)
|
||||
# define set_offset_v2_k_offset(v2,val) (offset_v2_k_offset(v2) = (val))
|
||||
#endif
|
||||
|
||||
/* Key of an item determines its location in the S+tree, and
|
||||
is composed of 4 components */
|
||||
struct reiserfs_key {
|
||||
__u32 k_dir_id; /* packing locality: by default parent
|
||||
__le32 k_dir_id; /* packing locality: by default parent
|
||||
directory object id */
|
||||
__u32 k_objectid; /* object identifier */
|
||||
__le32 k_objectid; /* object identifier */
|
||||
union {
|
||||
struct offset_v1 k_offset_v1;
|
||||
struct offset_v2 k_offset_v2;
|
||||
} __attribute__ ((__packed__)) u;
|
||||
} __attribute__ ((__packed__));
|
||||
|
||||
struct in_core_key {
|
||||
__u32 k_dir_id; /* packing locality: by default parent
|
||||
directory object id */
|
||||
__u32 k_objectid; /* object identifier */
|
||||
__u64 k_offset;
|
||||
__u8 k_type;
|
||||
};
|
||||
|
||||
struct cpu_key {
|
||||
struct reiserfs_key on_disk_key;
|
||||
struct in_core_key on_disk_key;
|
||||
int version;
|
||||
int key_length; /* 3 in all cases but direct2indirect and
|
||||
indirect2direct conversion */
|
||||
|
@ -508,15 +487,15 @@ struct item_head
|
|||
item. Note that the key, not this field, is used to
|
||||
determine the item type, and thus which field this
|
||||
union contains. */
|
||||
__u16 ih_free_space_reserved;
|
||||
__le16 ih_free_space_reserved;
|
||||
/* Iff this is a directory item, this field equals the
|
||||
number of directory entries in the directory item. */
|
||||
__u16 ih_entry_count;
|
||||
__le16 ih_entry_count;
|
||||
} __attribute__ ((__packed__)) u;
|
||||
__u16 ih_item_len; /* total size of the item body */
|
||||
__u16 ih_item_location; /* an offset to the item body
|
||||
__le16 ih_item_len; /* total size of the item body */
|
||||
__le16 ih_item_location; /* an offset to the item body
|
||||
* within the block */
|
||||
__u16 ih_version; /* 0 for all old items, 2 for new
|
||||
__le16 ih_version; /* 0 for all old items, 2 for new
|
||||
ones. Highest bit is set by fsck
|
||||
temporary, cleaned after all
|
||||
done */
|
||||
|
@ -670,43 +649,29 @@ static inline void set_le_ih_k_type (struct item_head * ih, int type)
|
|||
//
|
||||
static inline loff_t cpu_key_k_offset (const struct cpu_key * key)
|
||||
{
|
||||
return (key->version == KEY_FORMAT_3_5) ?
|
||||
key->on_disk_key.u.k_offset_v1.k_offset :
|
||||
key->on_disk_key.u.k_offset_v2.k_offset;
|
||||
return key->on_disk_key.k_offset;
|
||||
}
|
||||
|
||||
static inline loff_t cpu_key_k_type (const struct cpu_key * key)
|
||||
{
|
||||
return (key->version == KEY_FORMAT_3_5) ?
|
||||
uniqueness2type (key->on_disk_key.u.k_offset_v1.k_uniqueness) :
|
||||
key->on_disk_key.u.k_offset_v2.k_type;
|
||||
return key->on_disk_key.k_type;
|
||||
}
|
||||
|
||||
static inline void set_cpu_key_k_offset (struct cpu_key * key, loff_t offset)
|
||||
{
|
||||
(key->version == KEY_FORMAT_3_5) ?
|
||||
(key->on_disk_key.u.k_offset_v1.k_offset = offset) :
|
||||
(key->on_disk_key.u.k_offset_v2.k_offset = offset);
|
||||
key->on_disk_key.k_offset = offset;
|
||||
}
|
||||
|
||||
|
||||
static inline void set_cpu_key_k_type (struct cpu_key * key, int type)
|
||||
{
|
||||
(key->version == KEY_FORMAT_3_5) ?
|
||||
(key->on_disk_key.u.k_offset_v1.k_uniqueness = type2uniqueness (type)):
|
||||
(key->on_disk_key.u.k_offset_v2.k_type = type);
|
||||
key->on_disk_key.k_type = type;
|
||||
}
|
||||
|
||||
|
||||
static inline void cpu_key_k_offset_dec (struct cpu_key * key)
|
||||
{
|
||||
if (key->version == KEY_FORMAT_3_5)
|
||||
key->on_disk_key.u.k_offset_v1.k_offset --;
|
||||
else
|
||||
key->on_disk_key.u.k_offset_v2.k_offset --;
|
||||
key->on_disk_key.k_offset --;
|
||||
}
|
||||
|
||||
|
||||
#define is_direntry_cpu_key(key) (cpu_key_k_type (key) == TYPE_DIRENTRY)
|
||||
#define is_direct_cpu_key(key) (cpu_key_k_type (key) == TYPE_DIRECT)
|
||||
#define is_indirect_cpu_key(key) (cpu_key_k_type (key) == TYPE_INDIRECT)
|
||||
|
@ -752,10 +717,10 @@ extern struct reiserfs_key root_key;
|
|||
/* Header of a disk block. More precisely, header of a formatted leaf
|
||||
or internal node, and not the header of an unformatted node. */
|
||||
struct block_head {
|
||||
__u16 blk_level; /* Level of a block in the tree. */
|
||||
__u16 blk_nr_item; /* Number of keys/items in a block. */
|
||||
__u16 blk_free_space; /* Block free space in bytes. */
|
||||
__u16 blk_reserved;
|
||||
__le16 blk_level; /* Level of a block in the tree. */
|
||||
__le16 blk_nr_item; /* Number of keys/items in a block. */
|
||||
__le16 blk_free_space; /* Block free space in bytes. */
|
||||
__le16 blk_reserved;
|
||||
/* dump this in v4/planA */
|
||||
struct reiserfs_key blk_right_delim_key; /* kept only for compatibility */
|
||||
};
|
||||
|
@ -819,19 +784,19 @@ struct block_head {
|
|||
//
|
||||
struct stat_data_v1
|
||||
{
|
||||
__u16 sd_mode; /* file type, permissions */
|
||||
__u16 sd_nlink; /* number of hard links */
|
||||
__u16 sd_uid; /* owner */
|
||||
__u16 sd_gid; /* group */
|
||||
__u32 sd_size; /* file size */
|
||||
__u32 sd_atime; /* time of last access */
|
||||
__u32 sd_mtime; /* time file was last modified */
|
||||
__u32 sd_ctime; /* time inode (stat data) was last changed (except changes to sd_atime and sd_mtime) */
|
||||
__le16 sd_mode; /* file type, permissions */
|
||||
__le16 sd_nlink; /* number of hard links */
|
||||
__le16 sd_uid; /* owner */
|
||||
__le16 sd_gid; /* group */
|
||||
__le32 sd_size; /* file size */
|
||||
__le32 sd_atime; /* time of last access */
|
||||
__le32 sd_mtime; /* time file was last modified */
|
||||
__le32 sd_ctime; /* time inode (stat data) was last changed (except changes to sd_atime and sd_mtime) */
|
||||
union {
|
||||
__u32 sd_rdev;
|
||||
__u32 sd_blocks; /* number of blocks file uses */
|
||||
__le32 sd_rdev;
|
||||
__le32 sd_blocks; /* number of blocks file uses */
|
||||
} __attribute__ ((__packed__)) u;
|
||||
__u32 sd_first_direct_byte; /* first byte of file which is stored
|
||||
__le32 sd_first_direct_byte; /* first byte of file which is stored
|
||||
in a direct item: except that if it
|
||||
equals 1 it is a symlink and if it
|
||||
equals ~(__u32)0 there is no
|
||||
|
@ -897,20 +862,20 @@ struct stat_data_v1
|
|||
/* Stat Data on disk (reiserfs version of UFS disk inode minus the
|
||||
address blocks) */
|
||||
struct stat_data {
|
||||
__u16 sd_mode; /* file type, permissions */
|
||||
__u16 sd_attrs; /* persistent inode flags */
|
||||
__u32 sd_nlink; /* number of hard links */
|
||||
__u64 sd_size; /* file size */
|
||||
__u32 sd_uid; /* owner */
|
||||
__u32 sd_gid; /* group */
|
||||
__u32 sd_atime; /* time of last access */
|
||||
__u32 sd_mtime; /* time file was last modified */
|
||||
__u32 sd_ctime; /* time inode (stat data) was last changed (except changes to sd_atime and sd_mtime) */
|
||||
__u32 sd_blocks;
|
||||
__le16 sd_mode; /* file type, permissions */
|
||||
__le16 sd_attrs; /* persistent inode flags */
|
||||
__le32 sd_nlink; /* number of hard links */
|
||||
__le64 sd_size; /* file size */
|
||||
__le32 sd_uid; /* owner */
|
||||
__le32 sd_gid; /* group */
|
||||
__le32 sd_atime; /* time of last access */
|
||||
__le32 sd_mtime; /* time file was last modified */
|
||||
__le32 sd_ctime; /* time inode (stat data) was last changed (except changes to sd_atime and sd_mtime) */
|
||||
__le32 sd_blocks;
|
||||
union {
|
||||
__u32 sd_rdev;
|
||||
__u32 sd_generation;
|
||||
//__u32 sd_first_direct_byte;
|
||||
__le32 sd_rdev;
|
||||
__le32 sd_generation;
|
||||
//__le32 sd_first_direct_byte;
|
||||
/* first byte of file which is stored in a
|
||||
direct item: except that if it equals 1
|
||||
it is a symlink and if it equals
|
||||
|
@ -993,12 +958,12 @@ struct stat_data {
|
|||
|
||||
struct reiserfs_de_head
|
||||
{
|
||||
__u32 deh_offset; /* third component of the directory entry key */
|
||||
__u32 deh_dir_id; /* objectid of the parent directory of the object, that is referenced
|
||||
__le32 deh_offset; /* third component of the directory entry key */
|
||||
__le32 deh_dir_id; /* objectid of the parent directory of the object, that is referenced
|
||||
by directory entry */
|
||||
__u32 deh_objectid; /* objectid of the object, that is referenced by directory entry */
|
||||
__u16 deh_location; /* offset of name in the whole item */
|
||||
__u16 deh_state; /* whether 1) entry contains stat data (for future), and 2) whether
|
||||
__le32 deh_objectid; /* objectid of the object, that is referenced by directory entry */
|
||||
__le16 deh_location; /* offset of name in the whole item */
|
||||
__le16 deh_state; /* whether 1) entry contains stat data (for future), and 2) whether
|
||||
entry is hidden (unlinked) */
|
||||
} __attribute__ ((__packed__));
|
||||
#define DEH_SIZE sizeof(struct reiserfs_de_head)
|
||||
|
@ -1058,10 +1023,10 @@ struct reiserfs_de_head
|
|||
#define de_visible(deh) test_bit_unaligned (DEH_Visible, &((deh)->deh_state))
|
||||
#define de_hidden(deh) !test_bit_unaligned (DEH_Visible, &((deh)->deh_state))
|
||||
|
||||
extern void make_empty_dir_item_v1 (char * body, __u32 dirid, __u32 objid,
|
||||
__u32 par_dirid, __u32 par_objid);
|
||||
extern void make_empty_dir_item (char * body, __u32 dirid, __u32 objid,
|
||||
__u32 par_dirid, __u32 par_objid);
|
||||
extern void make_empty_dir_item_v1 (char * body, __le32 dirid, __le32 objid,
|
||||
__le32 par_dirid, __le32 par_objid);
|
||||
extern void make_empty_dir_item (char * body, __le32 dirid, __le32 objid,
|
||||
__le32 par_dirid, __le32 par_objid);
|
||||
|
||||
/* array of the entry headers */
|
||||
/* get item body */
|
||||
|
@ -1160,9 +1125,9 @@ struct reiserfs_dir_entry
|
|||
/* Disk child pointer: The pointer from an internal node of the tree
|
||||
to a node that is on disk. */
|
||||
struct disk_child {
|
||||
__u32 dc_block_number; /* Disk child's block number. */
|
||||
__u16 dc_size; /* Disk child's used space. */
|
||||
__u16 dc_reserved;
|
||||
__le32 dc_block_number; /* Disk child's block number. */
|
||||
__le16 dc_size; /* Disk child's used space. */
|
||||
__le16 dc_reserved;
|
||||
};
|
||||
|
||||
#define DC_SIZE (sizeof(struct disk_child))
|
||||
|
@ -1476,7 +1441,7 @@ struct tree_balance
|
|||
int fs_gen; /* saved value of `reiserfs_generation' counter
|
||||
see FILESYSTEM_CHANGED() macro in reiserfs_fs.h */
|
||||
#ifdef DISPLACE_NEW_PACKING_LOCALITIES
|
||||
struct reiserfs_key key; /* key pointer, to pass to block allocator or
|
||||
struct in_core_key key; /* key pointer, to pass to block allocator or
|
||||
another low-level subsystem */
|
||||
#endif
|
||||
} ;
|
||||
|
@ -1630,10 +1595,10 @@ struct reiserfs_iget_args {
|
|||
|
||||
/* first block written in a commit. */
|
||||
struct reiserfs_journal_desc {
|
||||
__u32 j_trans_id ; /* id of commit */
|
||||
__u32 j_len ; /* length of commit. len +1 is the commit block */
|
||||
__u32 j_mount_id ; /* mount id of this trans*/
|
||||
__u32 j_realblock[1] ; /* real locations for each block */
|
||||
__le32 j_trans_id ; /* id of commit */
|
||||
__le32 j_len ; /* length of commit. len +1 is the commit block */
|
||||
__le32 j_mount_id ; /* mount id of this trans*/
|
||||
__le32 j_realblock[1] ; /* real locations for each block */
|
||||
} ;
|
||||
|
||||
#define get_desc_trans_id(d) le32_to_cpu((d)->j_trans_id)
|
||||
|
@ -1646,9 +1611,9 @@ struct reiserfs_journal_desc {
|
|||
|
||||
/* last block written in a commit */
|
||||
struct reiserfs_journal_commit {
|
||||
__u32 j_trans_id ; /* must match j_trans_id from the desc block */
|
||||
__u32 j_len ; /* ditto */
|
||||
__u32 j_realblock[1] ; /* real locations for each block */
|
||||
__le32 j_trans_id ; /* must match j_trans_id from the desc block */
|
||||
__le32 j_len ; /* ditto */
|
||||
__le32 j_realblock[1] ; /* real locations for each block */
|
||||
} ;
|
||||
|
||||
#define get_commit_trans_id(c) le32_to_cpu((c)->j_trans_id)
|
||||
|
@ -1663,9 +1628,9 @@ struct reiserfs_journal_commit {
|
|||
** and this transaction does not need to be replayed.
|
||||
*/
|
||||
struct reiserfs_journal_header {
|
||||
__u32 j_last_flush_trans_id ; /* id of last fully flushed transaction */
|
||||
__u32 j_first_unflushed_offset ; /* offset in the log of where to start replay after a crash */
|
||||
__u32 j_mount_id ;
|
||||
__le32 j_last_flush_trans_id ; /* id of last fully flushed transaction */
|
||||
__le32 j_first_unflushed_offset ; /* offset in the log of where to start replay after a crash */
|
||||
__le32 j_mount_id ;
|
||||
/* 12 */ struct journal_params jh_journal;
|
||||
} ;
|
||||
|
||||
|
@ -2117,7 +2082,7 @@ struct buffer_head * get_FEB (struct tree_balance *);
|
|||
struct __reiserfs_blocknr_hint {
|
||||
struct inode * inode; /* inode passed to allocator, if we allocate unf. nodes */
|
||||
long block; /* file offset, in blocks */
|
||||
struct reiserfs_key key;
|
||||
struct in_core_key key;
|
||||
struct path * path; /* search path, used by allocator to deternine search_start by
|
||||
* various ways */
|
||||
struct reiserfs_transaction_handle * th; /* transaction handle is needed to log super blocks and
|
||||
|
@ -2144,7 +2109,7 @@ void reiserfs_init_alloc_options (struct super_block *s);
|
|||
* to use for a new object underneat it. The locality is returned
|
||||
* in disk byte order (le).
|
||||
*/
|
||||
u32 reiserfs_choose_packing(struct inode *dir);
|
||||
__le32 reiserfs_choose_packing(struct inode *dir);
|
||||
|
||||
int is_reusable (struct super_block * s, b_blocknr_t block, int bit_value);
|
||||
void reiserfs_free_block (struct reiserfs_transaction_handle *th, struct inode *, b_blocknr_t, int for_unformatted);
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
#define REISERFS_XATTR_MAGIC 0x52465841 /* "RFXA" */
|
||||
|
||||
struct reiserfs_xattr_header {
|
||||
__u32 h_magic; /* magic number for identification */
|
||||
__u32 h_hash; /* hash of the value */
|
||||
__le32 h_magic; /* magic number for identification */
|
||||
__le32 h_hash; /* hash of the value */
|
||||
};
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
|
|
@ -845,6 +845,7 @@ extern void sched_idle_next(void);
|
|||
extern void set_user_nice(task_t *p, long nice);
|
||||
extern int task_prio(const task_t *p);
|
||||
extern int task_nice(const task_t *p);
|
||||
extern int can_nice(const task_t *p, const int nice);
|
||||
extern int task_curr(const task_t *p);
|
||||
extern int idle_cpu(int cpu);
|
||||
extern int sched_setscheduler(struct task_struct *, int, struct sched_param *);
|
||||
|
@ -1011,7 +1012,6 @@ extern int copy_thread(int, unsigned long, unsigned long, unsigned long, struct
|
|||
extern void flush_thread(void);
|
||||
extern void exit_thread(void);
|
||||
|
||||
extern void exit_mm(struct task_struct *);
|
||||
extern void exit_files(struct task_struct *);
|
||||
extern void exit_signal(struct task_struct *);
|
||||
extern void __exit_signal(struct task_struct *);
|
||||
|
|
|
@ -8,6 +8,17 @@
|
|||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
/*
|
||||
* These values of sa_flags are used only by the kernel as part of the
|
||||
* irq handling routines.
|
||||
*
|
||||
* SA_INTERRUPT is also used by the irq handling routines.
|
||||
* SA_SHIRQ is for shared interrupt support on PCI and EISA.
|
||||
*/
|
||||
#define SA_PROBE SA_ONESHOT
|
||||
#define SA_SAMPLE_RANDOM SA_RESTART
|
||||
#define SA_SHIRQ 0x04000000
|
||||
|
||||
/*
|
||||
* Real Time signals may be queued.
|
||||
*/
|
||||
|
@ -209,6 +220,12 @@ static inline void init_sigpending(struct sigpending *sig)
|
|||
INIT_LIST_HEAD(&sig->list);
|
||||
}
|
||||
|
||||
/* Test if 'sig' is valid signal. Use this instead of testing _NSIG directly */
|
||||
static inline int valid_signal(unsigned long sig)
|
||||
{
|
||||
return sig <= _NSIG ? 1 : 0;
|
||||
}
|
||||
|
||||
extern int group_send_sig_info(int sig, struct siginfo *info, struct task_struct *p);
|
||||
extern int __group_send_sig_info(int, struct siginfo *, struct task_struct *);
|
||||
extern long do_sigpending(void __user *, unsigned long);
|
||||
|
|
|
@ -167,13 +167,14 @@ struct skb_shared_info {
|
|||
* @h: Transport layer header
|
||||
* @nh: Network layer header
|
||||
* @mac: Link layer header
|
||||
* @dst: FIXME: Describe this field
|
||||
* @dst: destination entry
|
||||
* @sp: the security path, used for xfrm
|
||||
* @cb: Control buffer. Free for use by every layer. Put private vars here
|
||||
* @len: Length of actual data
|
||||
* @data_len: Data length
|
||||
* @mac_len: Length of link layer header
|
||||
* @csum: Checksum
|
||||
* @__unused: Dead field, may be reused
|
||||
* @local_df: allow local fragmentation
|
||||
* @cloned: Head may be cloned (check refcnt to be sure)
|
||||
* @nohdr: Payload reference only, must not modify header
|
||||
* @pkt_type: Packet class
|
||||
|
@ -968,6 +969,7 @@ static inline void __skb_queue_purge(struct sk_buff_head *list)
|
|||
kfree_skb(skb);
|
||||
}
|
||||
|
||||
#ifndef CONFIG_HAVE_ARCH_DEV_ALLOC_SKB
|
||||
/**
|
||||
* __dev_alloc_skb - allocate an skbuff for sending
|
||||
* @length: length to allocate
|
||||
|
@ -980,7 +982,6 @@ static inline void __skb_queue_purge(struct sk_buff_head *list)
|
|||
*
|
||||
* %NULL is returned in there is no free memory.
|
||||
*/
|
||||
#ifndef CONFIG_HAVE_ARCH_DEV_ALLOC_SKB
|
||||
static inline struct sk_buff *__dev_alloc_skb(unsigned int length,
|
||||
int gfp_mask)
|
||||
{
|
||||
|
|
|
@ -62,16 +62,9 @@ extern kmem_cache_t *kmem_cache_create(const char *, size_t, size_t, unsigned lo
|
|||
extern int kmem_cache_destroy(kmem_cache_t *);
|
||||
extern int kmem_cache_shrink(kmem_cache_t *);
|
||||
extern void *kmem_cache_alloc(kmem_cache_t *, unsigned int __nocast);
|
||||
#ifdef CONFIG_NUMA
|
||||
extern void *kmem_cache_alloc_node(kmem_cache_t *, int);
|
||||
#else
|
||||
static inline void *kmem_cache_alloc_node(kmem_cache_t *cachep, int node)
|
||||
{
|
||||
return kmem_cache_alloc(cachep, GFP_KERNEL);
|
||||
}
|
||||
#endif
|
||||
extern void kmem_cache_free(kmem_cache_t *, void *);
|
||||
extern unsigned int kmem_cache_size(kmem_cache_t *);
|
||||
extern kmem_cache_t *kmem_find_general_cachep(size_t size, int gfpflags);
|
||||
|
||||
/* Size description struct for general caches. */
|
||||
struct cache_sizes {
|
||||
|
@ -109,6 +102,20 @@ extern void *kcalloc(size_t, size_t, unsigned int __nocast);
|
|||
extern void kfree(const void *);
|
||||
extern unsigned int ksize(const void *);
|
||||
|
||||
#ifdef CONFIG_NUMA
|
||||
extern void *kmem_cache_alloc_node(kmem_cache_t *, int flags, int node);
|
||||
extern void *kmalloc_node(size_t size, int flags, int node);
|
||||
#else
|
||||
static inline void *kmem_cache_alloc_node(kmem_cache_t *cachep, int flags, int node)
|
||||
{
|
||||
return kmem_cache_alloc(cachep, flags);
|
||||
}
|
||||
static inline void *kmalloc_node(size_t size, int flags, int node)
|
||||
{
|
||||
return kmalloc(size, flags);
|
||||
}
|
||||
#endif
|
||||
|
||||
extern int FASTCALL(kmem_cache_reap(int));
|
||||
extern int FASTCALL(kmem_ptr_validate(kmem_cache_t *cachep, void *ptr));
|
||||
|
||||
|
|
|
@ -456,8 +456,7 @@ asmlinkage long sys_semctl(int semid, int semnum, int cmd, union semun arg);
|
|||
asmlinkage long sys_semtimedop(int semid, struct sembuf __user *sops,
|
||||
unsigned nsops,
|
||||
const struct timespec __user *timeout);
|
||||
asmlinkage long sys_shmat(int shmid, char __user *shmaddr,
|
||||
int shmflg, unsigned long __user *addr);
|
||||
asmlinkage long sys_shmat(int shmid, char __user *shmaddr, int shmflg);
|
||||
asmlinkage long sys_shmget(key_t key, size_t size, int flag);
|
||||
asmlinkage long sys_shmdt(char __user *shmaddr);
|
||||
asmlinkage long sys_shmctl(int shmid, int cmd, struct shmid_ds __user *buf);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue