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]
Message-ID: <45D63B1B.4000503@us.ibm.com>
Date:	Fri, 16 Feb 2007 17:15:39 -0600
From:	"Steve French (smfltc)" <smfltc@...ibm.com>
To:	miklos@...redi.hu
CC:	Dave Kleikamp <shaggy@...ux.vnet.ibm.com>,
	akpm@...ux-foundation.org, linux-fsdevel@...r.kernel.org,
	linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [Fwd: [PATCH] consolidate generic_writepages and mpage_writepages]


>From: Miklos Szeredi <miklos@...redi.hu>
>To: akpm@...ux-foundation.org
>Cc: linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
>Subject: [PATCH] consolidate generic_writepages and mpage_writepages
>Date: 	Fri, 16 Feb 2007 17:23:25 +0100
>
>From: Miklos Szeredi <mszeredi@...e.cz>
>
>Clean up massive code duplication between mpage_writepages() and
>generic_writepages().
>
>The new generic function, write_cache_pages() takes a function pointer
>argument, which will be called for each page to be written.
>
>Maybe cifs_writepages() too can use this infrastructure, but I'm not
>touching that with a ten-foot pole.
>  
>
The cifs case ought to be one of the simpler ones, pseudo-code is pretty 
easy, the hard part is all of the stuff unrelated to cifs:
Ideally if there were generic functions to help out, cifs writepages 
would look roughly like the following

cifs_writepages(struct address_space *mapping, struct writeback_control 
*wbc)
{
   
    while (no more pages to write) {
        /* find writeable file handle for this inode */
        /* find the biggest set of contiguous pages that total less than 
wsize */
        if (packet signing is enabled)
                /* write lock pages so they can not be changed under us 
while we are calculating the checksum */
      
       CIFSSMBWrite2(tree_connection, network_file_handle, array of 
iovecs, number of iovecs);

        if(packet signing was enabled)
                /* unlock pages */

        if(error) {
             set page errors
             if (mounted "hard" )
                   continue; /* retry */
             else /* if no retry possible */
                   return error to caller;
       }
        update bytes written statistics
        update index to point to next set of pages
    }  /* end while loop */
}


If it were even better, CIFSSMBWrite2 could be called async - so that it 
did not have to wait for a network response from Samba (just an ack from 
TCP), before issuing the next write onto the wire - but this would 
require that we could queue a pointer to a completion routine to the mpx 
entry.
-
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