remove kdevname() before someone starts using it again
PATCH 1/1 remove kdevname() before someone starts using it again
fs/libfs.c +0 -11
@@ -332,14 +332,3 @@set_page_dirty (page);return 0 ; } - -/* -* Print device name (in decimal, hexadecimal or symbolic) -* Note: returns pointer to static data! -*/ -const char *kdevname (kdev_t dev) -{ -static char buffer[32 ]; -sprintf (buffer,"%02x:%02x" ,major (dev),minor (dev)); -return buffer; -}
include/linux/fs.h +0 -1
@@ -1074,7 +1074,6 @@extern void close_bdev_excl (struct block_device *,int );extern const char *cdevname (kdev_t ); -extern const char *kdevname (kdev_t );extern void init_special_inode (struct inode *,umode_t ,dev_t );/* Invalid inode operations -- fs/bad_inode.c */
include/linux/kdev_t.h +0 -2
@@ -101,8 +101,6 @@#define NODEV (mk_kdev(0,0))#define B_FREE (mk_kdev(0xff,0xff)) -extern const char *kdevname (kdev_t );/* note: returns pointer to static data! */ -static inline int kdev_same (kdev_t dev1,kdev_t dev2) {return dev1.value == dev2.value;
kernel/ksyms.c +0 -1
@@ -511,7 +511,6 @@EXPORT_SYMBOL (vsprintf);EXPORT_SYMBOL (vsnprintf);EXPORT_SYMBOL (vsscanf); -EXPORT_SYMBOL (kdevname);EXPORT_SYMBOL (__bdevname);EXPORT_SYMBOL (cdevname);EXPORT_SYMBOL (simple_strtoull);
fs/libfs.c line 333
Quoted 5 lines · Christoph Hellwig
fs/libfs.c +0
-0@@ -332,14 +332,3 @@set_page_dirty (page);return 0 ;
A quick grep shows that Intermezzo FS still uses kdevname if you've turned on debugging (fs/intermezzo/sysctl.c). As for pending stuff, both Reiser4 & pktcdvd also use it. So I guess people are still using it... What is your reason for removing it?
Cheers,
Nicholas
Quoted 9 lines · Nicholas Wourms
fs/libfs.c line 333
Quoted 5 lines · Christoph Hellwig
fs/libfs.c +0
-0@@ -332,14 +332,3 @@set_page_dirty (page);return 0 ;A quick grep shows that Intermezzo FS still uses kdevname if you've turned on debugging (
fs/intermezzo/sysctl.c).
Look at the code. It's not compiled in, and if someone sets the cpp macro it won't build for lots of other reasons (e.g. set_device_ro prototype).
Quoted 3 lines
As for
pending stuff, both Reiser4 & pktcdvd also use it. So I guess people are still using it...
That's they problem. Bot that either of them is scheduled for 2.6 anyway as far as I know.
Quoted 2 lines
What is your reason for
removing it?
It's a broken interface. Use the proper replacements instead.
Quoted 4 lines · Nicholas Wourms
A quick grep shows that Intermezzo FS still uses kdevname if you've turned on debugging (
fs/intermezzo/sysctl.c). As for pending stuff, both Reiser4 & pktcdvd also use it. So I
reiser4 switched to bdevname().
Quoted 5 lines
guess people are still using it... What is your reason for removing it?
Cheers,
Nicholas
Nikita.
Quoted 7 lines · Nikita Danilov
Quoted 4 lines · Nicholas Wourms
A quick grep shows that Intermezzo FS still uses kdevname if you've turned on debugging (
fs/intermezzo/sysctl.c). As for pending stuff, both Reiser4 & pktcdvd also use it. So Ireiser4 switched to
bdevname().
Although bdevname is the simplest replacement it's usually the wrong one. If you refer to a filesystem with it use sb->s_id, if you refer to a block device you normally want to use partition_name() - it gives much nicer output.
Quoted 2 lines · Christoph Hellwig
partition_name()
That function would appear to be
a) slow
b) leaky
c) racy and
d) plain wrong if dev_t's can get recycled.
Can we at least give it a lock? :(
Quoted 7 lines · Christoph Hellwig
Quoted 6 lines · Nikita Danilov
Quoted 4 lines · Nicholas Wourms
A quick grep shows that Intermezzo FS still uses kdevname if you've turned on debugging (
fs/intermezzo/sysctl.c). As for pending stuff, both Reiser4 & pktcdvd also use it. So I
Quoted 6 lines
Quoted 1 line
reiser4 switched to
bdevname().Although bdevname is the simplest replacement it's usually the wrong one. If you refer to a filesystem with it use
sb->s_id, if you refer to a block device you normally want to usepartition_name()- it gives much nicer output.
Thank you for the information.
We need something to name per super block directory under /sys/fs/reiser4. It probably makes sense to have a convention for this shared by all file systems living on top of block devices, like using sb->s_id.
Quoted 1 line
Nikita.
Quoted 8 lines · Nikita Danilov
Quoted 4 lines · Nicholas Wourms
A quick grep shows that Intermezzo FS still uses kdevname if you've turned on debugging (
fs/intermezzo/sysctl.c). As for pending stuff, both Reiser4 & pktcdvd also use it. So Ireiser4 switched to
bdevname().
When will the reiser4 bk repo be updated to reflect this? It has been pretty quiet for the last few days or so, compared to the daily updating it used to get. As of yesterday, trying to compile reiser4 as a module yeilded the undefined reference to kdevname in a few places, not to mention a few other undefined references as well...
Cheers,
Nicholas
Quoted 7 lines · Nicholas Wourms
Quoted 6 lines · Nikita Danilov
Quoted 4 lines · Nicholas Wourms
A quick grep shows that Intermezzo FS still uses kdevname if you've turned on debugging (
fs/intermezzo/sysctl.c). As for pending stuff, both Reiser4 & pktcdvd also use it. So I
Quoted 6 lines
Quoted 2 lines
reiser4 switched to
bdevname().When will the reiser4 bk repo be updated to reflect this? It has been pretty quiet for the last few days or so, compared to the daily updating it used to get. As of
It is currently undergoing some changing that rendered it unstable. I hope in few days a lot of commits will be made.
Quoted 3 lines
yesterday, trying to compile reiser4 as a module yeilded the undefined reference to kdevname in a few places, not to mention a few other undefined references as well...
We are not paying attention to the compilability as module yet. Apropos, thank you for trying reiser4.
Quoted 4 lines
Cheers,
Nicholas
Nikita.
Quoted 15 lines · Nikita Danilov
Quoted 7 lines · Nicholas Wourms
Quoted 6 lines · Nikita Danilov
Quoted 4 lines · Nicholas Wourms
A quick grep shows that Intermezzo FS still uses kdevname if you've turned on debugging (
fs/intermezzo/sysctl.c). As for pending stuff, both Reiser4 & pktcdvd also use it. So IQuoted 6 lines
Quoted 2 lines
reiser4 switched to
bdevname().When will the reiser4 bk repo be updated to reflect this? It has been pretty quiet for the last few days or so, compared to the daily updating it used to get. As of
Quoted 9 lines
It is currently undergoing some changing that rendered it unstable. I hope in few days a lot of commits will be made.
Quoted 3 lines
yesterday, trying to compile reiser4 as a module yeilded the undefined reference to kdevname in a few places, not to mention a few other undefined references as well...
We are not paying attention to the compilability as module yet. Apropos, thank you for trying reiser4.
No problem. I can send you a patch against the reiser4-linux-2.5 tree which contains the relevant exports needed to compile reiser4 as a module. Though, I haven't actually been able to test reiser as a module since the recent 2.5 is causing some major headaches in other areas :-).
Cheers,
Nicholas
Hello!
Quoted 3 lines · Nicholas Wourms
No problem. I can send you a patch against the reiser4-linux-2.5 tree which contains the relevant exports needed to compile reiser4 as a module. Though, I haven't
Please send it. Thank you.
Bye,
Oleg
Hello!
Quoted 10 lines · Nicholas Wourms
Quoted 4 lines
Quoted 3 lines
A quick grep shows that Intermezzo FS still uses kdevname if you've turned on debugging (
fs/intermezzo/sysctl.c). As for pending stuff, both Reiser4 & pktcdvd also use it. So Ireiser4 switched to
bdevname().When will the reiser4 bk repo be updated to reflect this? It has been pretty quiet for the last few days or so, compared to the daily updating it used to get. As of yesterday, trying to compile reiser4 as a module yeilded the undefined reference to kdevname in a few places, not to mention a few other undefined references as well...
Ah, our private bk repo -> public bk repo have died for some reason. I restarted it. All the recent changes should appear soon.
Bye,
Oleg