On Thu, Jun 22, 2006 at 06:19:20PM +0100, Darren J Moffat wrote:
> Bill Sommerfeld wrote:
> >On Thu, 2006-06-22 at 13:01, Roch wrote:
> >> Is there a sync command that targets individual FS ?
> >
> >Yes.  lockfs -f
> 
> Does lockfs work with ZFS ?  The man page appears to indicate it is very 
> UFS specific.
Well, it just ends up doing an ioctl(), which zfs recognizes:

# dtrace -n 'syscall::ioctl:entry/pid == $target/{self->on = 1}' \
    -n'fbt:::/self->on/{}' -n 'syscall::ioctl:return/self->on/{self->on = 0}' \
    -F -c 'lockfs -f /aux1'
dtrace: description 'syscall::ioctl:entry' matched 1 probe
dtrace: description 'fbt:::' matched 44321 probes
dtrace: description 'syscall::ioctl:return' matched 1 probe
dtrace: pid 151072 has exited
CPU FUNCTION                                 
  0  -> ioctl                                 
  0    -> getf                                
  0      -> set_active_fd                     
  0      <- set_active_fd                     
  0    <- getf                                
  0    -> get_udatamodel                      
  0    <- get_udatamodel                      
  0    -> fop_ioctl                           
  0      -> zfs_ioctl                         
  0      <- zfs_ioctl                         
  0      -> zfs_sync                          
  0        -> zil_commit                      
  0        <- zil_commit                      
  0      <- zfs_sync                          
  0    <- fop_ioctl                           
  0    -> releasef                            
  0      -> clear_active_fd                   
  0      <- clear_active_fd                   
  0      -> cv_broadcast                      
  0      <- cv_broadcast                      
  0    <- releasef                            
  0  <- ioctl                                 

So the sync happens.

Cheers,
- jonathan

-- 
Jonathan Adams, Solaris Kernel Development
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to