lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 22 May 2008 14:13:07 -0500
From:	"Steve French" <smfrench@...il.com>
To:	linux-fsdevel <linux-fsdevel@...r.kernel.org>,
	lkml <linux-kernel@...r.kernel.org>
Subject: pagevecs of more than PAGEVEC_SIZE pages

Now that various servers support processing larger than 64K file
writes, it would be helpful to have pagevecs that are larger than 14
pages (PAGEVEC_SIZE).so an array of more pages could be passed to
kernel_sendmsg (thus allowing writes larger than 56K, depending on
wsize - the server limit is currently 8MB)

pagevec_lookup_tag (and the inline function pagevec_space which I
don't use) is the main place that cifs needs a pagevec instead of
simply an array of pages and PAGEVEC_SIZE does not seem to matter
there (it works if I malloc a structure with more pages and request
more than 14 pages out of pagevec_lookup_tag).  Is there another
better alternative other than defining a larger pagevec (pagevec2 or
cifs_pagevec)?  Should I simply kmalloc something larger than a
pagevec and cast a (struct pagevec *) to it?

 static int cifs_writepages(struct address_space *mapping,
                           struct writeback_control *wbc)
 {
@@ -1209,7 +1216,7 @@ static int cifs_writepages(struct address_space *mapping,
        __u64 offset = 0;
        struct cifsFileInfo *open_file;
        struct page *page;
-       struct pagevec pvec;
+       struct pagevec2 pvec;
        int rc = 0;
        int scanned = 0;
        int xid;
@@ -1229,7 +1236,7 @@ static int cifs_writepages(struct address_space *mapping,
                        if (!experimEnabled)
                                return generic_writepages(mapping, wbc);

-       iov = kmalloc(32 * sizeof(struct kvec), GFP_KERNEL);
+       iov = kmalloc(maximum_pages_to_write_based_on_wsize *
sizeof(struct kvec), GFP_KERNEL);
        if (iov == NULL)
                return generic_writepages(mapping, wbc);

@@ -1261,7 +1268,7 @@ retry:
        while (!done && (index <= end) &&
               (nr_pages = pagevec_lookup_tag(&pvec, mapping, &index,
                        PAGECACHE_TAG_DIRTY,
-                       min(end - index, (pgoff_t)PAGEVEC_SIZE - 1) + 1))) {
+                       min(end - index,
(pgoff_t)maximum_pages_to_write_based_on_wsize - 1) + 1))) {
                int first;
                unsigned int i;



-- 
Thanks,

Steve
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ