#ifndef _INOTAIL_H
#define _INOTAIL_H
/* Number of items to tail. */
#define DEFAULT_N_LINES 10
/* tail modes */
enum { M_LINES, M_BYTES };
/* Every tailed file is represented as a file_struct */
struct file_struct {
char *name; /* Name of file (or '-' for stdin) */
int fd; /* File descriptor (or -1 if file is not open */
off_t st_size; /* File size */
unsigned ignore; /* Wheter to ignore the file in further processing */
int i_watch; /* Inotify watch associated with file_struct */
};
#ifdef DEBUG
# define dprintf(fmt, args...) fprintf(stderr, fmt, ##args)
#else
# define dprintf(fmt, args...)
#endif /* DEBUG */
#ifdef __GNUC__
# define unlikely(x) __builtin_expect(!!(x), 0) /* Taken from linux kernel source */
#else
# define unlikely(x) (x)
#endif
#endif /* _INOTAIL_H */
/'>index : net-next.git
ahci: warn about remapped NVMe devices
Some Intel ahci implementations have a completely broken remapping mode
where they hide one or more NVMe devices behind the bar of an AHCI device.
Intel refuses to let the OS reprogram the BIOS to switch out of this
mode at runtime, and so far we're not come up with another good way
to undo the mess that the Chipset people created. So for now the only
thing we can do is to alert users about this situation and switch to the
faster and much saner so called "AHCI" mode insted of the RAID mode in
the BIOS so that the BIOS does not hide the NVMe devices from us.
The sitation is even worse as at least one vendor (thanks a lot Lenovo..)
has started hardcoding their BIOS into the "RAID" mode even for laptops
that don't use AHCI _at all_ and just have a single NVMe device. For now
there is an unspported Linux-only BIOS that undoes this braindamage,
but we'll have to see if things are getting better or worse from here.
Based on an earlier patch from Dan Williams <dan.j.williams@intel.com>.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Tejun Heo <tj@kernel.org>