summaryrefslogtreecommitdiffstats
path: root/TODO
blob: 4f1678dc9a6b11101344e4fe9841bca678bb08ea (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297

 Note that items with (!) have high priority.

dmesg
-----

 - add --follow option
   http://www.spinics.net/lists/util-linux-ng/msg04453.html

 - add --color to colorize err and panic messages

ldattach
--------

  - write usage()

minix (fsck, mkfs)
------------------

 - clean up types -- use ino_t, size_t and ssize_t

libmount (mount/umount)
-----------------------

 Note that the old mount/[u]mount.c code is in MAINTENANCE MODE only. All new
 features should be implemented to libmount or to the new mount/umount
 implementation in the libmount/samples/ directory.

 - (!) on systems with regular mtab file it is impossible to umount by "umount
   /dev/loop0" if the loop device has been created by "mount -o loop", because
   there is backing file in the mtab (instead of the device name). 

   Now we have all necessary information in /sysfs so it should be possible to
   translate the device name to backing file and then search in mtab for the 
   filename. See loopdev_get_loopfile().

 - (!!!) add libmount based umount(8) (see libmount/samples/ where is new mount(8) 
   implementation.

 - (!) add --source and --target options to specify device and mountpoint

     fstab:
        /dev/sda1 /foo	auto	defaults 0 0
        /foo      /mnt  auto    bind     0 0
     command line:
	mount -o remount,ro /foo

    ... this command is ambiguous. It would be better to have a way how specify
    target or source:

        mount --target /foo -o remount,ro

    Note that findmnt(8) already supports --target and --source.

 - add ---target-prefix option to specify prefix for mountpoints
   so then you can

	LIBMOUNT_FSTAB=/etc/fstab.foo mount -a --target-prefix=$FOO_ROOT

   to create a new hierarchy of filesystems at $FOO_ROOT.

 - umount by label:
	# mount LABEL=mylabel
	# umount LABEL=mylabel

losetup
-------

 - (!!!) use new lib/sysfs.c code for losetup(8), the new implementation should
   be moved to sys-utils/losetup.c.

 - (!!!) add support for LOOP_CTL_ ioctls (probably will be in kernel 3.1 or 3.2)

libblkd and libmountL
----------------------------

 - use __attribute__((notnull)) and __attribute__((warn_unused_result))
   Note that the code has to be usefull for non-gcc compilers too.

partx
-----

 - (!) add support loop devices:

	partx -a /path/file.img

	* associate the file with loop device (use lib/loopdev.c)
	* map partitions by BLKPG_ADD_PARTITION

 - support mapping by device-mapper if argv[0] is "kpartx" or --dm option is used.
     
 - (!) add regression tests for partx, addpart and delpart


docs
----

 - (!) use something better than gtk-doc for libmount and libblkid (doxyden?)

 - (!) add API documentation to libuuid

 - add Documentation/ directory with:
	   - man page template 
	   - usage() HOW-TO
	   - move README.devel to the Documentation/

build-sys
--------

 - use non-recursive build-sys, see
   http://thread.gmane.org/gmane.linux.utilities.util-linux-ng/3297

 - we use something like

	AC_ARG_ENABLE(...., enable_foo=check)
	build_foo=yes
	if test "x$enable_foo" = xcheck; then
		if test "x$linux_os" = xno; then
			build_foo=no
		fi
	fi
	AM_CONDITIONAL(BUILD_FOO, test "x$build_foo" = xyes)

   for Linux-only utils in configure.ac. It would be nice to set all defaults
   for all "$enable_" variables at the begin of the configure script according to
   $linux_os. Something like:

	if test "x$linux_os" = xno
		enable_mount=no
		enable_libmount=no
		enable_lsblk=no
	fi

   then we can remove all "if test "x$enable_foo" = xcheck;" stuff from the rest
   of the configure script.

 - it would be nice to remove all "if BUILD_LIB{MOUNT,BLKID,UUID}" from the 
   Makefiles (e.g. misc-utils/Makefile.am) and use BUILD_<utilname> only

   The configure.ac has to care about dependence between utils and librares and
   enable BUILD_<utilname>.

lib/tt.c
--------

 - allows to sort columns, for example sort lsblk(8) output by SIZE

login-utils:
-----------

 - use err() and warn() macros rather than fprintf(stderr, ...)

libblkid
--------

 - remove strerrr() from debug messages (use %m) to make BLKID_DEBUG= output
   thread-safe

 - (!) don't use internally blkid_loff_t, rather use off_t, size_t, ssize_t,
       stdint.h types and so on...

 - add -<BE|LE> suffix to test images for native-endian filesystems (e.g. swap)
   and add support for such functionality to tests/ts/blkid/low-probe

 - add FSSIZE value  -- filesystem size (klibc requirement)

 - (!) add support for dasd PT (used for example on s390)

 - (!!!) support PARTUUID= tag

   * the partitions probing is already supported by low-level part of the
     library, but it's necessary add support for this tag also to high-level
     blkid_cache and blkid_evaluate_* APIs

   * add blkid -P <PARTUUID>

   * add PARTUUID to wipefs output

wipefs
------

 - some filesystem (namely FAT) contains more magic strings, so if you erase
   one magic string the FS is still detectable by libblkid. We have to inform
   users that there is more valid magic string for the same FS.

 - (!!!) allow to wipe partition tables

fdisk(s)
--------

 - add "move end" command to move end of the last primary/extended partition.
   This feature seems very attractive to users who resizing their disks 
   (for example in virtual machines).

 - sfdisk has to use rpmatch() for answers to y/n questions
   (e.g. "Are you satisfied with this? [ynq]")

 - sfdisk rounds to cylinders is -uM (megabyte units) is specified, this is
   pretty stupid feature. It has to round to sectors if -uS or -uM is specified.

 - Sun label support is completely useless for large disks, it uses number of
   cylinders from on-disk-label where the geometry is stored by int16 values.
   It seems better to completely ignore this stuff from the label and always
   use geometry + BLKGETSIZE64 from kernel.

 - use off_t instead "long long"

 - catch SIGINT (Ctrl-C) and return to main menu.
   From Red Hat bugzilla #545488:

   While using fdisk normally, if you accidentally pressed the wrong button (to
   start a sequence of questions for some operation, e.g. 'c' to create
   partition).  The tool tries too hard to keep asking you for valid input.  You
   can't provide a blank or invalid input to get it to break out of the current
   dialog sequence and get back to the main menu.

 - fdisk/* refactoring (probably implement libfdisk ???)

 - add GPT support (probably implement libfdisk ???)

misc
----

 - switch_root:
     - move all mountpoints to the newroot (there are hardcoded /proc /sys and /dev paths now)
     - add --dont-move[=<list of dirs>] options

 - use ngettext() for strings with plurals, for example

    /* include/nls.h */
    #define P_(id, id_plural, n)	ngettext(id, id_plural, n)

    printf(P_("%d used sector",
              "%d used sectors", sectors),
              sectors);

 - use TZ=UTC and LANG=en_US.UTF-8 for tests

 - add mllockall() and SCHED_FIFO to hwclock,
   see http://lkml.org/lkml/2008/10/12/132
 
 - use rpmatch() for all Y/N questions


---------------
exotic requests
---------------

 - mount -a -- reorder fstab entries by paths before mount (just idea only)

 - mount -a  (just idea only)

        Date:   Sun, 3 Jun 2007 18:04:24 +0300 (MET DST)
        From: Szabolcs Szakacsits <szaka@sienet.hu>

	In the past the right record order could be figured out easily by just
	checking out fstab (if one knew what to look for) but considering the
	fastly increasing number of user space file systems and their usage, with
	their path, library, etc dependencies, it's getting trickier and is a black
	magic for most users because they simply expect drives to be mounted
	independently of their order in fstab.

	One typical, wrongly edited fstab example is:

	  /dev/hda2 /             ext3      defaults  1 1
	  /dev/hda1 /mnt/windows  ntfs-3g   defaults  0 0
	  /dev/hda3 /usr          ext3      defaults  0 0

	The events:

	  mount  ->  /sbin/mount.ntfs-3g  ->
		 ->  resolves to <path1>/ntfs-3g via a symlink ->
		 ->  ntfs-3g requires at least <path2>/libfuse*

	There are many potential solutions. For example installing everything on
	the root file system which may be needed for successful mount. But this
	is not always feasible or practical since we could end up putting almost
	everything on the root file system in the end.

	Another idea is an improved mount strategy:

	  do {
		try to mount all unmounted entries
	  } while (not all mounted && at least one new was successfully mounted)

 - rewrite ipcs to use /proc/sys/kernel rather than unreliable syscalls
   (there are problems with 32bit userspace on 64bit kernel)


 - add SELinux security contexts support to the 'ipcs' utility
   http://bugzilla.redhat.com/show_bug.cgi?id=225342

   Would be great to list the current system IPC Objects with their respective
   security labels (where allowed) with something like 'ipcs -Z' - following the
   way other tools reports those.