History

block: remove CONFIG_LBDAF

Currently support for 64-bit sector_t and blkcnt_t is optional on 32-bit architectures. These types are required to support block device and/or file sizes larger than 2 TiB, and have generally defaulted to on for a long time. Enabling the option only increases the i386 tinyconfig size by 145 bytes, and many data structures already always use 64-bit values for their in-core and on-disk data structures anyway, so there should not be a large change in dynamic memory usage either. Dropping this option removes a somewhat weird non-default config that has cause various bugs or compiler warnings when actually used.

Christoph Hellwig committed 7 years ago

Commit 72deb451 parent 75199aa61 files · +52 −250Browse files

Showing the changes to include/linux (3 of 61 files). Show all

Unified · Split

3 files
  1. include/linux/genhd.h +4 −4
  2. include/linux/kernel.h +2 −12
  3. include/linux/types.h +0 −5
include/linux/genhd.h+4−4
@@ -714,7 +714,7 @@ static inline void hd_free_part(struct hd_struct *part) · 713 unmodified lines
714714 */
715715 static inline sector_t part_nr_sects_read(struct hd_struct *part)
716716 {
717−#if BITS_PER_LONG==32 && defined(CONFIG_LBDAF) && defined(CONFIG_SMP)
717+#if BITS_PER_LONG==32 && defined(CONFIG_SMP)
718718 sector_t nr_sects;
719719 unsigned seq;
720720 do {
@@ -722,7 +722,7 @@ static inline sector_t part_nr_sects_read(struct hd_struct *part) · 1 unmodified line
722722 nr_sects = part->nr_sects;
723723 } while (read_seqcount_retry(&part->nr_sects_seq, seq));
724724 return nr_sects;
725−#elif BITS_PER_LONG==32 && defined(CONFIG_LBDAF) && defined(CONFIG_PREEMPT)
725+#elif BITS_PER_LONG==32 && defined(CONFIG_PREEMPT)
726726 sector_t nr_sects;
727727
728728 preempt_disable();
@@ -741,11 +741,11 @@ static inline sector_t part_nr_sects_read(struct hd_struct *part) · 12 unmodified lines
741741 */
742742 static inline void part_nr_sects_write(struct hd_struct *part, sector_t size)
743743 {
744−#if BITS_PER_LONG==32 && defined(CONFIG_LBDAF) && defined(CONFIG_SMP)
744+#if BITS_PER_LONG==32 && defined(CONFIG_SMP)
745745 write_seqcount_begin(&part->nr_sects_seq);
746746 part->nr_sects = size;
747747 write_seqcount_end(&part->nr_sects_seq);
748−#elif BITS_PER_LONG==32 && defined(CONFIG_LBDAF) && defined(CONFIG_PREEMPT)
748+#elif BITS_PER_LONG==32 && defined(CONFIG_PREEMPT)
749749 preempt_disable();
750750 part->nr_sects = size;
751751 preempt_enable();
include/linux/kernel.h+2−12
@@ -17,6 +17,7 @@ · 16 unmodified lines
1717 #include <asm/byteorder.h>
1818 #include <asm/div64.h>
1919 #include <uapi/linux/kernel.h>
20+#include <asm/div64.h>
2021
2122 #define STACK_MAGIC 0xdeadbeef
2223
@@ -175,18 +176,7 @@ · 152 unmodified lines
175176 #define _RET_IP_ (unsigned long)__builtin_return_address(0)
176177 #define _THIS_IP_ ({ __label__ __here; __here: (unsigned long)&&__here; })
177178
178−#ifdef CONFIG_LBDAF
179−# define sector_div(a, b) do_div(a, b)
180−#else
181−# define sector_div(n, b)( \
182−{ \
183− int _res; \
184− _res = (n) % (b); \
185− (n) /= (b); \
186− _res; \
187−} \
188−)
189−#endif
179+#define sector_div(a, b) do_div(a, b)
190180
191181 /**
192182 * upper_32_bits - return bits 32-63 of a number
include/linux/types.h+0−5
@@ -127,13 +127,8 @@ typedef s64 int64_t; · 126 unmodified lines
127127 *
128128 * blkcnt_t is the type of the inode's block count.
129129 */
130−#ifdef CONFIG_LBDAF
131130 typedef u64 sector_t;
132131 typedef u64 blkcnt_t;
133−#else
134−typedef unsigned long sector_t;
135−typedef unsigned long blkcnt_t;
136−#endif
137132
138133 /*
139134 * The type of an index into the pagecache.

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t