Lines Matching full:content

25  * @content: kernel-space buffer, 4k aligned
26 * @len: size of @content cache (0 if caching disabled)
27 * @ofs: start of content within file (-1 if no cached content)
33 * read/dir requests. But content is cached only under some preconditions.
34 * Uncached content is signalled by a negative value of @ofs.
42 void *content; member
56 * hmcdrv_cache_get() - looks for file data/content in read cache
60 * in content cache (for the file/cmd specified in @ftp)
74 if ((hmcdrv_cache_file.ofs < 0) || /* has content? */ in hmcdrv_cache_get()
78 /* there seems to be cached content - calculate the maximum number in hmcdrv_cache_get()
95 hmcdrv_cache_file.content + pos, in hmcdrv_cache_get()
97 pr_debug("using cached content of '%s', returning %zd/%zd bytes\n", in hmcdrv_cache_get()
119 /* only cache content if the read/dir cache really exists in hmcdrv_cache_do()
131 cftp.buf = hmcdrv_cache_file.content; /* and update */ in hmcdrv_cache_do()
137 pr_debug("caching %zd bytes content for '%s'\n", in hmcdrv_cache_do()
146 memcpy(ftp->buf, hmcdrv_cache_file.content, len); in hmcdrv_cache_do()
150 hmcdrv_cache_file.ofs = -1; /* invalidate content */ in hmcdrv_cache_do()
220 hmcdrv_cache_file.content = in hmcdrv_cache_startup()
224 if (!hmcdrv_cache_file.content) { in hmcdrv_cache_startup()
230 pr_debug("content cache enabled, size is %zu bytes\n", in hmcdrv_cache_startup()
243 if (hmcdrv_cache_file.content) { in hmcdrv_cache_shutdown()
244 free_pages((unsigned long) hmcdrv_cache_file.content, in hmcdrv_cache_shutdown()
246 hmcdrv_cache_file.content = NULL; in hmcdrv_cache_shutdown()