* [nfs:nfs-for-next 76/83] fs/nfs/blocklayout/blocklayout.c:1208:1: sparse: symbol 'bl_pg_init_write' was not declared. Should it be static?
@ 2012-10-02 5:09 Fengguang Wu
0 siblings, 0 replies; only message in thread
From: Fengguang Wu @ 2012-10-02 5:09 UTC (permalink / raw)
To: Peng Tao; +Cc: kernel-janitors, Trond Myklebust, linux-nfs
[-- Attachment #1: Type: text/plain, Size: 3723 bytes --]
Hi Peng,
FYI, there are new sparse warnings show up in
tree: git://git.linux-nfs.org/projects/trondmy/linux-nfs.git nfs-for-next
head: 2afdfa5a846246de50e1881f71ba5c0aac0b415f
commit: 96c9eae638765c2bf2ca4f5a6325484f9bb69aa7 [76/83] pnfsblock: fix non-aligned DIO write
+ fs/nfs/blocklayout/blocklayout.c:1208:1: sparse: symbol 'bl_pg_init_write' was not declared. Should it be static?
vim +1208 fs/nfs/blocklayout/blocklayout.c
155e7524 (Fred Isaman 2011-07-30 1176) return 0;
155e7524 (Fred Isaman 2011-07-30 1177) }
155e7524 (Fred Isaman 2011-07-30 1178)
f742dc4a (Peng Tao 2012-08-24 1179) static bool
f742dc4a (Peng Tao 2012-08-24 1180) is_aligned_req(struct nfs_page *req, unsigned int alignment)
f742dc4a (Peng Tao 2012-08-24 1181) {
f742dc4a (Peng Tao 2012-08-24 1182) return IS_ALIGNED(req->wb_offset, alignment) &&
f742dc4a (Peng Tao 2012-08-24 1183) IS_ALIGNED(req->wb_bytes, alignment);
f742dc4a (Peng Tao 2012-08-24 1184) }
f742dc4a (Peng Tao 2012-08-24 1185)
f742dc4a (Peng Tao 2012-08-24 1186) static void
f742dc4a (Peng Tao 2012-08-24 1187) bl_pg_init_read(struct nfs_pageio_descriptor *pgio, struct nfs_page *req)
f742dc4a (Peng Tao 2012-08-24 1188) {
f742dc4a (Peng Tao 2012-08-24 1189) if (pgio->pg_dreq != NULL &&
f742dc4a (Peng Tao 2012-08-24 1190) !is_aligned_req(req, SECTOR_SIZE))
f742dc4a (Peng Tao 2012-08-24 1191) nfs_pageio_reset_read_mds(pgio);
f742dc4a (Peng Tao 2012-08-24 1192) else
f742dc4a (Peng Tao 2012-08-24 1193) pnfs_generic_pg_init_read(pgio, req);
f742dc4a (Peng Tao 2012-08-24 1194) }
f742dc4a (Peng Tao 2012-08-24 1195)
f742dc4a (Peng Tao 2012-08-24 1196) static bool
f742dc4a (Peng Tao 2012-08-24 1197) bl_pg_test_read(struct nfs_pageio_descriptor *pgio, struct nfs_page *prev,
f742dc4a (Peng Tao 2012-08-24 1198) struct nfs_page *req)
f742dc4a (Peng Tao 2012-08-24 1199) {
f742dc4a (Peng Tao 2012-08-24 1200) if (pgio->pg_dreq != NULL &&
f742dc4a (Peng Tao 2012-08-24 1201) !is_aligned_req(req, SECTOR_SIZE))
f742dc4a (Peng Tao 2012-08-24 1202) return false;
f742dc4a (Peng Tao 2012-08-24 1203)
f742dc4a (Peng Tao 2012-08-24 1204) return pnfs_generic_pg_test(pgio, prev, req);
f742dc4a (Peng Tao 2012-08-24 1205) }
f742dc4a (Peng Tao 2012-08-24 1206)
96c9eae6 (Peng Tao 2012-08-24 1207) void
96c9eae6 (Peng Tao 2012-08-24 @1208) bl_pg_init_write(struct nfs_pageio_descriptor *pgio, struct nfs_page *req)
96c9eae6 (Peng Tao 2012-08-24 1209) {
96c9eae6 (Peng Tao 2012-08-24 1210) if (pgio->pg_dreq != NULL &&
96c9eae6 (Peng Tao 2012-08-24 1211) !is_aligned_req(req, PAGE_CACHE_SIZE))
96c9eae6 (Peng Tao 2012-08-24 1212) nfs_pageio_reset_write_mds(pgio);
96c9eae6 (Peng Tao 2012-08-24 1213) else
96c9eae6 (Peng Tao 2012-08-24 1214) pnfs_generic_pg_init_write(pgio, req);
96c9eae6 (Peng Tao 2012-08-24 1215) }
96c9eae6 (Peng Tao 2012-08-24 1216)
96c9eae6 (Peng Tao 2012-08-24 1217) static bool
96c9eae6 (Peng Tao 2012-08-24 1218) bl_pg_test_write(struct nfs_pageio_descriptor *pgio, struct nfs_page *prev,
96c9eae6 (Peng Tao 2012-08-24 1219) struct nfs_page *req)
96c9eae6 (Peng Tao 2012-08-24 1220) {
96c9eae6 (Peng Tao 2012-08-24 1221) if (pgio->pg_dreq != NULL &&
96c9eae6 (Peng Tao 2012-08-24 1222) !is_aligned_req(req, PAGE_CACHE_SIZE))
96c9eae6 (Peng Tao 2012-08-24 1223) return false;
96c9eae6 (Peng Tao 2012-08-24 1224)
Please consider folding the attached diff :-)
---
0-DAY kernel build testing backend Open Source Technology Centre
Fengguang Wu, Yuanhan Liu Intel Corporation
[-- Attachment #2: make-it-static-96c9eae.diff --]
[-- Type: text/x-diff, Size: 468 bytes --]
diff --git a/fs/nfs/blocklayout/blocklayout.c b/fs/nfs/blocklayout/blocklayout.c
index af3ef0e..a34014a 100644
--- a/fs/nfs/blocklayout/blocklayout.c
+++ b/fs/nfs/blocklayout/blocklayout.c
@@ -1204,7 +1204,7 @@ bl_pg_test_read(struct nfs_pageio_descriptor *pgio, struct nfs_page *prev,
return pnfs_generic_pg_test(pgio, prev, req);
}
-void
+static void
bl_pg_init_write(struct nfs_pageio_descriptor *pgio, struct nfs_page *req)
{
if (pgio->pg_dreq != NULL &&
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2012-10-02 5:35 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-02 5:09 [nfs:nfs-for-next 76/83] fs/nfs/blocklayout/blocklayout.c:1208:1: sparse: symbol 'bl_pg_init_write' was not declared. Should it be static? Fengguang Wu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).