1. 03 12月, 2016 1 次提交
  2. 02 12月, 2016 4 次提交
  3. 28 9月, 2016 1 次提交
  4. 30 8月, 2016 1 次提交
  5. 16 8月, 2016 1 次提交
  6. 15 8月, 2016 1 次提交
  7. 06 7月, 2016 3 次提交
  8. 26 5月, 2016 3 次提交
  9. 18 5月, 2016 7 次提交
  10. 09 5月, 2016 5 次提交
    • J
      nfs: have flexfiles mirror keep creds for both ro and rw layouts · 3064b686
      Jeff Layton 提交于
      A mirror can be shared between multiple layouts, even with different
      iomodes. That makes stats gathering simpler, but it causes a problem
      when we get different creds in READ vs. RW layouts.
      
      The current code drops the newer credentials onto the floor when this
      occurs. That's problematic when you fetch a READ layout first, and then
      a RW. If the READ layout doesn't have the correct creds to do a write,
      then writes will fail.
      
      We could just overwrite the READ credentials with the RW ones, but that
      would break the ability for the server to fence the layout for reads if
      things go awry. We need to be able to revert to the earlier READ creds
      if the RW layout is returned afterward.
      
      The simplest fix is to just keep two sets of creds per mirror. One for
      READ layouts and one for RW, and then use the appropriate set depending
      on the iomode of the layout segment.
      
      Also fix up some RCU nits that sparse found.
      Signed-off-by: NJeff Layton <jeff.layton@primarydata.com>
      Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
      3064b686
    • J
      nfs: get a reference to the credential in ff_layout_alloc_lseg · 90a0be00
      Jeff Layton 提交于
      We're just as likely to have allocation problems here as we would if we
      delay looking up the credential like we currently do. Fix the code to
      get a rpc_cred reference early, as soon as the mirror is set up.
      
      This allows us to eliminate the mirror early if there is a problem
      getting an rpc credential. This also allows us to drop the uid/gid
      from the layout_mirror struct as well.
      
      In the event that we find an existing mirror where this one would go, we
      swap in the new creds unconditionally, and drop the reference to the old
      one.
      
      Note that the old ff_layout_update_mirror_cred function wouldn't set
      this pointer unless the DS version was 3, but we don't know what the DS
      version is at this point. I'm a little unclear on why it did that as you
      still need creds to talk to v4 servers as well. I have the code set
      it regardless of the DS version here.
      
      Also note the change to using generic creds instead of calling
      lookup_cred directly. With that change, we also need to populate the
      group_info pointer in the acred as some functions expect that to never
      be NULL. Instead of allocating one every time however, we can allocate
      one when the module is loaded and share it since the group_info is
      refcounted.
      Signed-off-by: NJeff Layton <jeff.layton@primarydata.com>
      Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
      90a0be00
    • J
      nfs: have ff_layout_get_ds_cred take a reference to the cred · 57f3f4c0
      Jeff Layton 提交于
      In later patches, we're going to want to allow the creds to be updated
      when we get a new layout with updated creds. Have this function take
      a reference to the cred that is later put once the call has been
      dispatched.
      
      Also, prepare for this change by ensuring we follow RCU rules when
      getting a reference to the cred as well.
      Signed-off-by: NJeff Layton <jeff.layton@primarydata.com>
      Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
      57f3f4c0
    • J
      nfs: don't call nfs4_ff_layout_prepare_ds from ff_layout_get_ds_cred · 547a6376
      Jeff Layton 提交于
      All the callers already call that function before calling into here,
      so it ends up being a no-op anyway.
      Signed-off-by: NJeff Layton <jeff.layton@primarydata.com>
      Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
      547a6376
    • D
      NFS: Save struct inode * inside nfs_commit_info to clarify usage of i_lock · fe238e60
      Dave Wysochanski 提交于
      Commit ea2cf228 created nfs_commit_info and saved &inode->i_lock inside
      this NFS specific structure.  This obscures the usage of i_lock.
      Instead, save struct inode * so later it's clear the spinlock taken is
      i_lock.
      
      Should be no functional change.
      Signed-off-by: NDave Wysochanski <dwysocha@redhat.com>
      Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
      fe238e60
  11. 17 3月, 2016 1 次提交
    • J
      nfs4: nfs4_ff_layout_prepare_ds should return NULL if connection failed · 849dc324
      Jeff Layton 提交于
      I hit the following oops out of the blue while testing with flexfiles:
      
      BUG: unable to handle kernel NULL pointer dereference at 00000000000000e8
      IP: [<ffffffffa048f6b8>] nfs4_ff_find_or_create_ds_client+0x48/0x50 [nfs_layout_flexfiles]
      PGD 44031067 PUD 5062d067 PMD 0
      Oops: 0000 [#1] SMP
      Modules linked in: nfsv3 nfs_layout_flexfiles tun rpcsec_gss_krb5 nfsv4 dns_resolver nfs fscache dcdbas nfsd auth_rpcgss nfs_acl lockd grace sunrpc ip6t_rpfilter ip6t_REJECT nf_reject_ipv6 xt_conntrack ebtable_nat ebtable_broute bridge stp llc ebtable_filter ebtables ip6table_nat nf_conntrack_ipv6 nf_defrag_ipv6 nf_nat_ipv6 ip6table_mangle ip6table_security ip6table_raw ip6table_filter ip6_tables iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack iptable_mangle iptable_security iptable_raw bonding ipmi_devintf ipmi_msghandler snd_hda_codec_generic virtio_balloon ppdev snd_hda_intel snd_hda_controller snd_hda_codec iosf_mbi crct10dif_pclmul crc32_pclmul ghash_clmulni_intel snd_hda_core parport_pc snd_hwdep parport snd_seq snd_seq_device snd_pcm snd_timer acpi_cpufreq
       snd soundcore i2c_piix4 xfs libcrc32c joydev virtio_net virtio_console qxl drm_kms_helper ttm crc32c_intel drm virtio_pci serio_raw ata_generic virtio_ring virtio pata_acpi
      CPU: 0 PID: 19138 Comm: test5 Not tainted 4.1.9-100.pd.90.el7.x86_64 #1
      Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.8.2-20150714_191134- 04/01/2014
      task: ffff88007b70cf00 ti: ffff88004cc44000 task.ti: ffff88004cc44000
      RIP: 0010:[<ffffffffa048f6b8>]  [<ffffffffa048f6b8>] nfs4_ff_find_or_create_ds_client+0x48/0x50 [nfs_layout_flexfiles]
      RSP: 0018:ffff88004cc47890  EFLAGS: 00010246
      RAX: 0000000000000003 RBX: ffff880050932300 RCX: ffff88006978f488
      RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff88003e0e8540
      RBP: ffff88004cc47908 R08: 0000000000000000 R09: 0000000000000000
      R10: ffff88007ff8c758 R11: 0000000000000005 R12: ffff88003e0e8540
      R13: 0000000000000000 R14: ffff88006978f488 R15: ffff88004431cc80
      FS:  00007fea40c7c740(0000) GS:ffff88007fc00000(0000) knlGS:0000000000000000
      CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      CR2: 00000000000000e8 CR3: 0000000044318000 CR4: 00000000000406f0
      Stack:
       ffffffffa048c934 ffff880050932310 0000000100000001 ffff88006978f510
       ffff88006978f3c8 ffff88003e56cd90 ffff88004cc479d0 00000020a052aff0
       000000000004b000 ffff88004cc47908 ffff880050932300 ffff88004cc479d0
      Call Trace:
       [<ffffffffa048c934>] ? ff_layout_write_pagelist+0x64/0x220 [nfs_layout_flexfiles]
       [<ffffffffa057a3bf>] pnfs_generic_pg_writepages+0xaf/0x1b0 [nfsv4]
       [<ffffffffa051ab57>] nfs_pageio_doio+0x27/0x60 [nfs]
       [<ffffffffa051bfe4>] nfs_pageio_complete_mirror+0x54/0xa0 [nfs]
       [<ffffffffa051c7ad>] nfs_pageio_complete+0x2d/0x90 [nfs]
       [<ffffffffa052032d>] nfs_writepage_locked+0x8d/0xe0 [nfs]
       [<ffffffff811e4630>] ? page_referenced_one+0x1a0/0x1a0
       [<ffffffffa05210e7>] nfs_wb_single_page+0xf7/0x190 [nfs]
       [<ffffffffa05108d1>] nfs_launder_page+0x41/0x90 [nfs]
       [<ffffffff811b8930>] invalidate_inode_pages2_range+0x340/0x3a0
       [<ffffffff811b89a7>] invalidate_inode_pages2+0x17/0x20
       [<ffffffffa0513e1e>] nfs_release+0x9e/0xb0 [nfs]
       [<ffffffffa050fa1d>] nfs_file_release+0x3d/0x60 [nfs]
       [<ffffffff8122481c>] __fput+0xdc/0x1e0
       [<ffffffff8122496e>] ____fput+0xe/0x10
       [<ffffffff810bde67>] task_work_run+0xa7/0xe0
       [<ffffffff810af735>] get_signal+0x565/0x600
       [<ffffffff811a9815>] ? __filemap_fdatawrite_range+0x65/0x90
       [<ffffffff810144a7>] do_signal+0x37/0x730
       [<ffffffffa0569921>] ? nfs4_file_fsync+0x81/0x150 [nfsv4]
       [<ffffffff81254dbb>] ? vfs_fsync_range+0x3b/0xb0
       [<ffffffff811446a6>] ? __audit_syscall_exit+0x1e6/0x280
       [<ffffffff81014bff>] do_notify_resume+0x5f/0xa0
       [<ffffffff8178ec3c>] int_signal+0x12/0x17
      Code: 48 8b 40 70 8b 00 83 f8 03 74 20 83 f8 04 75 13 55 48 89 ce 48 89 d7 48 89 e5 e8 14 0f 0e 00 5d c3 66 90 0f 0b 66 0f 1f 44 00 00 <48> 8b 82 e8 00 00 00 c3 66 66 66 66 90 55 48 89 e5 41 57 41 56
      RIP  [<ffffffffa048f6b8>] nfs4_ff_find_or_create_ds_client+0x48/0x50 [nfs_layout_flexfiles]
       RSP <ffff88004cc47890>
      CR2: 00000000000000e8
      
      When the DS connection attempt fails, nfs4_ff_layout_prepare_ds marks it
      for the error but then just returns the ds as if it were usable. The
      comments though say:
      
        /* Upon return, either ds is connected, or ds is NULL */
      
      Ensure that we set the return pointer to NULL in the event that the
      connection attempt fails.
      Signed-off-by: NJeff Layton <jeff.layton@primarydata.com>
      Signed-off-by: NTrond Myklebust <trond.myklebust@primarydata.com>
      849dc324
  12. 28 1月, 2016 1 次提交
  13. 23 1月, 2016 1 次提交
  14. 22 1月, 2016 1 次提交
  15. 01 1月, 2016 1 次提交
  16. 30 12月, 2015 1 次提交
  17. 29 12月, 2015 7 次提交