Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QUEUE_FLAG_NONPROT not defined problem on SuSE Linux 11.1 (2.6.27.7) #21

Closed
GoogleCodeExporter opened this issue Aug 21, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

Linux meriadoc 2.6.27.7-9-default #1 SMP 2008-12-04 18:10:04 +0100 i686 
i686 i386 GNU/Linux

  CC [M]  /home/neko/compcache-0.5.1/compcache.o
/home/neko/compcache-0.5.1/compcache.c: In function ‘compcache_init’:
/home/neko/compcache-0.5.1/compcache.c:455: error: ‘QUEUE_FLAG_NONROT’ 
undeclared (first use in this function)
/home/neko/compcache-0.5.1/compcache.c:455: error: (Each undeclared 
identifier is reported only once
/home/neko/compcache-0.5.1/compcache.c:455: error: for each function it 
appears in.)
make[4]: *** [/home/neko/compcache-0.5.1/compcache.o] Error 1
make[3]: *** [_module_/home/neko/compcache-0.5.1] Error 2
make[2]: *** [sub-make] Error 2
make[1]: *** [all] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.27.7-9-obj/i386/default'
make: *** [all] Error 2

In compcache.c line 455 QUEUE_FLAG_NONROT is used to inform the block 
subsystem that there is no seek cost on the virtual swap disk, however 
while the functions to support swap discard are present in the kernel, this 
flag came in just after SuSE finalized their kernel patches for this 
release, so isn't present.

The use of QUEUE_FLAG_NONROT should be covered by a 

#ifdef QUEUE_FLAG_NONROT
      queue_flag_set_unlocked(QUEUE_FLAG_NONROT, compcache.disk->queue);
#endif

In order that swap discard support can be compiled and used. I found 
absolutely no problems in adding this little fix, compcache works great :)

Original issue reported on code.google.com by webmaste...@gtempaccount.com on 28 Jan 2009 at 3:02

@GoogleCodeExporter
Copy link
Author

--- compcache.c.orig    2009-01-28 12:14:22.000000000 -0600 
+++ compcache.c 2009-01-28 12:14:56.000000000 -0600 
@@ -452,7 +452,9 @@ static int __init compcache_init(void) 
        blk_queue_make_request(compcache.disk->queue, compcache_make_request); 

 #ifdef SWAP_DISCARD_SUPPORTED 
+#ifdef QUEUE_FLAG_NONROT 
        queue_flag_set_unlocked(QUEUE_FLAG_NONROT, compcache.disk->queue); 
+#endif 
        blk_queue_set_discard(compcache.disk->queue, 
                                compcache_prepare_discard); 
 #endif 

Original comment by mwsea...@gmail.com on 28 Jan 2009 at 6:14

@GoogleCodeExporter
Copy link
Author

Fixed in r276. Thanks for pointing this out!

Nitin

Original comment by nitingupta910@gmail.com on 28 Jan 2009 at 6:23

  • Changed state: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant